Exemplo n.º 1
0
        public async Task <IActionResult> NewProductCategory(SaveProductCategoryDto saveProductCategoryResource)
        {
            var productCategory = _mapper.Map <SaveProductCategoryDto, ProductCategory>(saveProductCategoryResource);
            await _productCategoryService.AddProductCategory(productCategory);

            return(RedirectToAction("ProductCategoryList"));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> NewProductCategory()
        {
            var categoryList = await _productCategoryService.GetProductCategoryListToForm();

            var saveProductCategoryResource = new SaveProductCategoryDto();

            saveProductCategoryResource.ProductCategoryList = categoryList;
            return(View(saveProductCategoryResource));
        }