コード例 #1
0
        public async Task <IActionResult> CreateProduct(CatalogProduct product)
        {
            if (!ModelState.IsValid)
            {
                return(await ReturnViewWithPostPutVM());
            }

            await catalogService.AddProduct(product);

            return(RedirectToAction("Index"));
        }