public ActionResult Create(Product product) { // TODO: Add insert logic here if (ModelState.IsValid) { _productService.Create(product); return RedirectToAction("Index"); } return View(product); }
public ActionResult Edit(Product product) { if (ModelState.IsValid) { _productService.Update(product); return RedirectToAction("Index"); } return View(product); }