public ActionResult EditCustomer(CustomerDataView customerDV) { if (!ModelState.IsValid) { return(View("CustomerEdit", new CustomerDataView() { Sexes = FakeDB.GetSelectListItemSex(), Customer = customerDV.Customer, SexId = customerDV.SexId })); } else { FakeDB.EditCustomer(customerDV.Customer); return(Redirect("/Customers")); } }
public void EditCustomer(Customer c) { FakeDB.EditCustomer(c); }