//GET api/Account/AllUsers
[Route("AllUsers")]
public List<IdentityUser> GetUsers()
{
var users = UserManager.Users.ToList();
return users;
//return query;
}
This is the returned error, nothing else is occurring when this Route is called. The only time the ApplicationUser is called is during the login process, which I then navigate to this view and call this route on the page load which errors out. Not sure if it's EntityFramework, code on the backend or ignorance.
public class ApplicationUser : IdentityUser
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string BirthDate { get; set; }
public bool IsDriver { get; set; }
public DateTime CreatedDate { get; set; }
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DmmContext", false)
{
}
}
The above is the ApplicationUser class.
//GET api/Account/AllUsers
[Route("AllUsers")]
public List<ApplicationUser> GetUsers()
{
var users = UserManager.Users.ToList();
return users;
//return query;
}