Esempio n. 1
0
        public ActionResult AddModel()
        {
            var model = new AddModelVM();

            model.CreateList(repo);

            return(View(model));
        }
Esempio n. 2
0
        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));
        }