如题,EntityFramework 如何更新 detached 实体,如下代码不能更新:Product p = null;using (EFDbContext context = new EFDbContext()) { p = context.Products.First();}using (EFDbContext context = new EFDbContext()) { p.Remark = "aaa"; context.SaveChanges(); //不能更新}
1 回答
- 1 回答
- 0 关注
- 670 浏览
添加回答
举报
0/150
提交
取消