I got below class:
public class AllRegistrationsViewComponent : ViewComponent
{
private readonly UserManager<IdentityUser> um;
private readonly MyContext myContext;
public AllRegistrationsViewComponent(UserManager<IdentityUser> um, MyContext myContext)
{
this.um = um;
this.myContext= myContext;
}
public async Task<IViewComponentResult> Invoke()
{
var allUsers= await um.Users.ToList();
return View(allUsers);
}
}
And I'm getting below message:
List <IdentityUser> does not contain a definition for GetAwaiter and no accessible method
GetAwaiter accepting a first argument of type List<IdentityUser> could be found