MVC, EF, Code First 相关问题总结
摘要:
1. 控制表名单复数:在DbContext类中修改OnModelCreating()为: protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Conventions.Remove(); }2. Entity Framework 内部错误调试:try { XXDbContext db = new XXDbContext(); db.EntitySet.Add(us... 阅读全文
posted @ 2013-08-31 23:45 MikeJia 阅读(1851) 评论(0) 推荐(0) 编辑