如題,EntityFramework 如何更新 detached 實(shí)體,如下代碼不能更新:Product p = null;using (EFDbContext context = new EFDbContext()) { p = context.Products.First();}using (EFDbContext context = new EFDbContext()) { p.Remark = "aaa"; context.SaveChanges(); //不能更新}
- 1 回答
- 0 關(guān)注
- 706 瀏覽
添加回答
舉報(bào)
0/150
提交
取消