コード例 #1
0
        public async Task <IActionResult> NewProductCategory(SaveProductCategoryDto saveProductCategoryResource)
        {
            var productCategory = _mapper.Map <SaveProductCategoryDto, ProductCategory>(saveProductCategoryResource);
            await _productCategoryService.AddProductCategory(productCategory);

            return(RedirectToAction("ProductCategoryList"));
        }
コード例 #2
0
        public async Task <IActionResult> NewProductCategory()
        {
            var categoryList = await _productCategoryService.GetProductCategoryListToForm();

            var saveProductCategoryResource = new SaveProductCategoryDto();

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