public ActionResult CreateCar(Car newCar) { if(ModelState.IsValid) { _carService.Add(newCar); return RedirectToAction("Cars"); } return View(newCar); }
public ActionResult EditCar(Car editedCar) { if(ModelState.IsValid) { _carService.Update(editedCar); return RedirectToAction("Cars"); } return View(editedCar); }