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