Your
GetDto
method presumably returns a
Task<Dto>
:
private async Task<Dto> GetDto() { ... }
In which case, your variable needs to be of the correct type:
Task<Dto> t = GetDto();
Dto dto = await t.ConfigureAwait(false);
Or:
ConfiguredTaskAwaitable<Dto> t = GetDto().ConfigureAwait(false);
Dto dto = await t;