📜  实体框架附加 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:33.979000             🧑  作者: Mango

代码示例1
using (var context = new MyEntities())
{
    context.Attach(client);
    client.Name = "Bob";
    context.SaveChanges();
}