Duplicate foreign keys when renaming ASP.NET Identity tables

前端 未结 1 1514
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 02:56

I followed the advice in this question to rename my ASP.NET Identity tables:

modelBuilder.Entity().ToTable(\"UserClaim\");
modelBuilder.         


        
1条回答
  •  没有蜡笔的小新
    2021-02-04 03:24

    You should skip the following line, then it works perfectly well:

    modelBuilder.Entity().ToTable("User");
    

    So the only mapping you need is:

    modelBuilder.Entity().ToTable("UserClaim");
    modelBuilder.Entity().ToTable("UserRole");
    modelBuilder.Entity().ToTable("UserLogin");
    modelBuilder.Entity().ToTable("Role");
    modelBuilder.Entity().ToTable("User");
    

    Hope that helps.

    0 讨论(0)
提交回复
热议问题