首页 > 代码库 > Modification Default Identity Table
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"); }
Modification Default Identity Table
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。