예제 #1
0
        public IActionResult Create(ProductCreateBindingModel productCreateBindingModel)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            this.productService.CreateProduct(productCreateBindingModel.To <Product>());

            return(this.Redirect("All"));
        }
예제 #2
0
        public IActionResult Create(ProductCreateBindingModel productCreateBindingModel)
        {
            if (!this.ModelState.IsValid)
            {
                // TODO: SAVE FORM RESULT
                return(this.View());
            }

            this.productService.CreateProduct(productCreateBindingModel.To <Product>());

            return(this.Redirect("All"));
        }