public ActionResult Create(Client client) { if (ModelState.IsValid) { db.Client.Add(client); db.SaveChanges(); return RedirectToAction("Index"); } return View(client); }
public ActionResult Edit(Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(client); }