EF框架批量更新

1 var customers = db.Customers.Where(c => c.name=='小明');
2 foreach (var customer in customers)
3 {
4     customer.Address = "Guangzhou";
5 }
6 db.SubmitChanges();

懂者不难。

posted @ 2015-07-01 16:49  点点_滴滴  阅读(558)  评论(0编辑  收藏  举报