Modification Default Identity Table
Step 1. Open IdentityModel.cs to add following code.
protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); // This needs to go before the other rules! modelBuilder.Entity<ApplicationUser>().ToTable("SystemUser").Property(p => p.Id).HasColumnName("UserId"); modelBuilder.Entity<ApplicationUser>().ToTable("SystemUsers").Ignore(p => p.PhoneNumber); modelBuilder.Entity<IdentityRole>().ToTable("SystemRoles"); modelBuilder.Entity<IdentityUserRole>().ToTable("SystemUserRoles"); modelBuilder.Entity<IdentityUserLogin>().ToTable("SystemUserLogins"); modelBuilder.Entity<IdentityUserClaim>().ToTable("SystemUserClaims"); }
Thanks & Best Regards!
Javi Zhu 朱佳辉
Mobile: 15900467108
Email: Javi.zhu@outlook.com