Example #1
0
        public ActionResult CreateProduct(Product product)
        {
            products.Insert(product);
            products.Commit();

            return RedirectToAction("ProductList");
        }
Example #2
0
        public ActionResult CreateProduct()
        {
            var model = new Product();

            return View(model);
        }
Example #3
0
        public ActionResult EditProduct(Product product)
        {
            products.Update(product);
            products.Commit();

            return RedirectToAction("ProductList");
        }