Beispiel #1
0
        public ActionResult Create(BProduct bproduct)
        {
            if (ModelState.IsValid)
            {
                db.BProducts.Add(bproduct);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(bproduct);
        }
Beispiel #2
0
 public ActionResult Edit(BProduct bproduct)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bproduct).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(bproduct);
 }