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

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