I extended only my IdentityUser class as below, Now I am trying to use include for my query to get all users and their roles but I keep receiving this error,
The property 'RoleId' is not a navigation property of entity type 'IdentityUserRole<string>'
My Extended IdentityUser class,
public class ApplicationUser :IdentityUser { public string FirstName { get; set; } public string LastName { get; set; } [Display(Name = "Social Security Number")] public string SocialSecurityNo { get; set; } public string ContactAddress { get; set; } [StringLength(10)] public string StreetNo { get; set; } [StringLength(100)] .......
And I am trying to do something like,
[HttpGet] public async Task<IActionResult> GetUsersList() { ] var test = await context.UserRoles .Include(x=>x.RoleId) .ToListAsync(); return Ok(test); }