摘要:
这个问题也很恶心活生生的把我设计好的表名,在自动生成的时候加上了复数,整个库一眼看上去难看的要死只要重写OnModelCreating时中加上这句就OK了 protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); } 阅读全文
posted @ 2013-02-27 16:56
陈跳跳
阅读(2256)
评论(0)
推荐(1)
摘要:
Global.Application_Start()调用DB结构初始化 Database.SetInitializer<YourContex>(new YourInitializer()); public class YourInitializer : DropCreateDatabaseIfModelChanges<YourContex> { protected override void Seed(YourContex context) { // This method will be called after migrat... 阅读全文
posted @ 2013-02-27 10:24
陈跳跳
阅读(1800)
评论(0)
推荐(0)
浙公网安备 33010602011771号