Ejemplo n.º 1
0
        public async Task <ActionResult> Edit([Bind(Include = "ProductId,Name")] ProductCategoryModel productCategoryModel)
        {
            if (ModelState.IsValid)
            {
                var category = Mapper.Map <ProductCategoryModel, ProductCategory>(productCategoryModel);
                await categoryService.CategoryEdit(category);

                return(RedirectToAction("Index"));
            }
            return(View(productCategoryModel));
        }