摘要: “System.NullReferenceException”类型的异常在 App_Web_zo44wdaq.dll 中发生,但未在用户代码中进行处理其他信息: 未将对象引用设置到对象的实例。 解决问题: return View( 这里不能为空 ); 为空时:用ViewBag.属性 ViewData 阅读全文
posted @ 2016-12-20 16:55 阿Q啊 阅读(2425) 评论(0) 推荐(0) 编辑
摘要: 找半天才找到 ef添加数据时出错原因:数据库表中没有主键 ,就算表中有自增列 Added方法也会报错; - this._db.SaveChanges() “this._db.SaveChanges()”引发了“System.Data.Entity.Infrastructure.DbUpdateCon 阅读全文
posted @ 2016-12-20 16:33 阿Q啊 阅读(1049) 评论(0) 推荐(0) 编辑