public async Task <IActionResult> NewProductCategory(SaveProductCategoryDto saveProductCategoryResource) { var productCategory = _mapper.Map <SaveProductCategoryDto, ProductCategory>(saveProductCategoryResource); await _productCategoryService.AddProductCategory(productCategory); return(RedirectToAction("ProductCategoryList")); }
public async Task <IActionResult> NewProductCategory() { var categoryList = await _productCategoryService.GetProductCategoryListToForm(); var saveProductCategoryResource = new SaveProductCategoryDto(); saveProductCategoryResource.ProductCategoryList = categoryList; return(View(saveProductCategoryResource)); }