Im using MVC6 project with Asp.net Identity and wanted to change the ID column from the string to INT. I Followed this article enter link description here
I get an error saying can insert a null into the ID columns for Role and User, but if i revert back to the norm it works.
public class ApplicationUser : IdentityUser<int>
{
}
public class ApplicationRole : IdentityRole<int>
{
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, int>
{
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);
}
public DbSet<PropertyManagementCompany> PMC { get; set; }
}