Пример #1
0
        public ActionResult ProductCreate(Product product)
        {
            products.Insert(product);
            products.Commit();

            return RedirectToAction("ProductIndex");
        }
Пример #2
0
 // GET: /Create
 public ActionResult ProductCreate()
 {
     var product = new Product();
     return View(product);
 }
Пример #3
0
        public ActionResult ProductEdit(Product product)
        {
            products.Update(product);
            products.Commit();

            return RedirectToAction("ProductIndex");
        }