如何在使用ASP.NET标识时更改表名?
AspNet
-更新
AspNet
public class ApplicationUser : IdentityUser{ public string FirstName { get; set; } public string LastName { get; set; } public string Address1 { get; set; } public string Address2 { get; set; } public string City { get; set; } public string State { get; set; } public string PostalCode { get; set; } public string PhonePrimary { get; set; } public string PhoneSecondary { get; set; }}public class ApplicationDbContext : IdentityDbContext<ApplicationUser>{ public ApplicationDbContext(): base("DefaultConnection") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity<IdentityUser>().ToTable("MyUsers"); }}
潇湘沐
阿波罗的战车