我如何更改由身份框架在数据库中生成的表名,例如“ AspNetUsers”,“ AspNetUserRoles”,“ AspNetUserLogin”

时间:2019-04-18 21:02:11

标签: c# asp.net-identity owin uniqueidentifier

受保护的覆盖无效OnModelCreating(DbModelBuilder modelBuilder)         {

        //Map entity to table
        modelBuilder.Entity<AspNetUsers>().ToTable("StudentInfo");
       modelBuilder.Entity<AspNetUserLogin>().ToTable("StandardInfo","dbo");
    }

0 个答案:

没有答案