public IActionResult Create(ProductCreateBindingModel productCreateBindingModel) { if (!ModelState.IsValid) { return(View()); } this.productService.CreateProduct(productCreateBindingModel.To <Product>()); return(this.Redirect("All")); }
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")); }