Exemplo n.º 1
0
        public ActionResult Index()
        {
            CatalogIndexView vm = new CatalogIndexView();

            vm.Catalogs = _catalogService.FindAll();

            return(View(vm));
        }
Exemplo n.º 2
0
        public ActionResult CreatePost(CatalogIndexView vm)
        {
            if (ModelState.IsValid)
            {
                _catalogService.Create(vm.AddCatalog);
            }

            vm.Catalogs = _catalogService.FindAll();

            return(View("Index", vm));
        }