How would you change the names of your tables using Entity Frameworks code first migrations.
The below code, creates my tables as :
RoleBindingModel, DivisionBindingModel etc. and that's not ideal.
How would you change the name to a custom table name? (Without changing your models name)
IdentityModels.cs
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
}
public DbSet<RoleBindingModel> Role { get; set; }
public DbSet<DivisionBindingModel> Division { get; set; }
public DbSet<CategoryBindingModel> Category { get; set; }
public DbSet<ProductBindingModel> Product { get; set; }
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
