如題,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 回答
- 0 關注
- 700 瀏覽
添加回答
舉報
0/150
提交
取消