Esempio n. 1
0
 public ActionResult CreateProduct(Product product)
 {
     products.Insert(product);
     products.Commit();
     return RedirectToAction("ProductList");
 }
Esempio n. 2
0
        public ActionResult EditProduct(Product product)
        {
            products.Update(product);
            products.Commit();

            return RedirectToAction("ProductList");
        }
Esempio n. 3
0
 public ActionResult CreateProduct()
 {
     var model = new Product();
     return View(model);
 }
Esempio n. 4
0
 public ActionResult EditProduct(Product product)
 {
     products.Update(product);
     products.Commit();
     return View(product);
 }