62,072
社区成员
发帖
与我相关
我的任务
分享
//Global.asax
void Application_Start(object sender, EventArgs e)
{
Database.SetInitializer<MyCrmContext>(new CreateDatabaseIfNotExists<MyCrmContext>());
}
public class MyCrmContext : DbContext
{
public DbSet<sys_navigation> sys_navigations { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
}
}