I am getting the compiler error
CS1061 'MAUserVM' does not contain a definition for 'GetAwaiter' and no accessible extension method 'GetAwaiter' accepting a first argument of type 'MAUserVM' could be found (are you missing a using directive or an assembly reference?)
Async Method
public class MAUserVM
{
public string AuthenticationStatus;
public MAUser mAUser;
public async Task<MAUserVM> GetMAUserAsync(string Email, string Password, IConfiguration configuration, IHttpContextAccessor accessor)
{
...
}
}
Calling method
private async Task<Boolean> AuthenticateUser(string email, string password)
{
...
// exception happening here
userVM = await userVM.GetMAUserAsync(email, password, _configuration, _accessor).Result;
...
}
What is causing this?