public ActionResult AddModel() { var model = new AddModelVM(); model.CreateList(repo); return(View(model)); }
public ActionResult AddModel(CarModel model) { var repo = CarRepoFactory.Create(); if (ModelState.IsValid) { var newmodel = new AddModelVM(); newmodel.CreateList(repo); return(View(newmodel)); } return(View(model)); }