// GET: Catalog/Edit/5 public ActionResult Edit(string code) { if (string.IsNullOrWhiteSpace(code)) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var catalog = _catalogService.GetCatalog(code); if (catalog == null) { return(HttpNotFound()); } return(View(CatalogViewModelMapper.MapEditViewModel(catalog, _productService.GetProducts()))); }
// GET: Catalog/Create public ActionResult Create() { var products = _productService.GetProducts(); return(View(CatalogViewModelMapper.MapCreateViewModel(products))); }
// GET: Catalog public ActionResult Index() { var catalogs = _catalogService.GetCatalogs(); return(View(CatalogViewModelMapper.MapListViewModel(catalogs))); }