public ActionResult Edit(CustomerEnt customer) { try { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", new { id = customer.ClientID })); } return(View("Error")); } catch (Exception) { return(View("Error")); } }
public ActionResult CreateConfirmed(CustomerEnt customer) { try { if (ModelState.IsValid) { db.CustomerEnts.Add(customer); db.SaveChanges(); return(RedirectToAction("Details", new { id = customer.ClientID })); } return(View("Error")); } catch (Exception) { return(View("Error")); } }