public ActionResult Edit([Bind(Include = "ID,Name,Description,Seller")] Item item)
 {
     if (ModelState.IsValid)
     {
         db.Entry(item).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Seller = new SelectList(db.Sellers, "SellerName", "SellerName", item.Seller);
     return(View(item));
 }
Example #2
0
 public void Update(Category item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
Example #3
0
 public void Update(Product product)
 {
     db.Entry(product).State = EntityState.Modified;
 }