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