public ActionResult _Update(Customer customer) { var northwind = new NorthwindDataContext(); var target = northwind.Customers.FirstOrDefault(c => c.CustomerID == customer.CustomerID); if (target != null) { target.CompanyName = customer.CompanyName; target.ContactName = customer.ContactName; northwind.SubmitChanges(); } return View(new GridModel(GetCustomers())); }
partial void DeleteCustomer(Customer instance);
partial void UpdateCustomer(Customer instance);
partial void InsertCustomer(Customer instance);