We are trying to map the ASPNetUsers
table to our custom table users. Below are the classes and their relationship.
public partial class Users
{
public int Id { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public string UserInfoId { get; set; }
public virtual AspNetUsers UserInfo { get; set; }
}
public class ApplicationUser : IdentityUser
{
public virtual Users Users { get; set; }
}
When we are implementing the identity using these models, we get the below error:
"Cannot use table 'AspNetUsers' in schema '' for entity 'AspNetUsers' since it is being used for another entity."
We have not done any changes in the ASPNetUsers
tables; it is same as we got through the migration.
How can we fix this?