public ActionResult Create(CarCreateModel model) { if (ModelState.IsValid) { Database.Add(model.Make, model.Year); return RedirectToAction("Index").WithNotification(Status.Success, "Car has been created succesfully"); } return View(model); }
public ActionResult Create() { var model = new CarCreateModel(); return View(model); }