zoukankan      html  css  js  c++  java
  • 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");
            }
  • 相关阅读:
    1002. A+B for Polynomials
    1010. 一元多项式求导
    BZOJ3569
    BZOJ3224
    loj2291. 「THUSC 2016」补退选
    平衡树入门
    高斯消元入门
    写手vector
    矩阵乘法入门
    母函数入门
  • 原文地址:https://www.cnblogs.com/Javi/p/6541870.html
Copyright © 2011-2022 走看看