예제 #1
0
 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);
 }
예제 #2
0
 public ActionResult Create()
 {
     var model = new CarCreateModel();
     return View(model);
 }