public ActionResult Edit(Driver driver) { if (ModelState.IsValid) { repository.Edit(driver); return RedirectToAction("Index"); } return View(driver); }
public ActionResult Create_Post() { Driver driver = new Driver(); TryUpdateModel<Driver>(driver); if (ModelState.IsValid) { repository.Add(driver); return RedirectToAction("Index"); } return View(); }