public ActionResult Index() { CatalogIndexView vm = new CatalogIndexView(); vm.Catalogs = _catalogService.FindAll(); return(View(vm)); }
public ActionResult CreatePost(CatalogIndexView vm) { if (ModelState.IsValid) { _catalogService.Create(vm.AddCatalog); } vm.Catalogs = _catalogService.FindAll(); return(View("Index", vm)); }