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)); }
public void Update(Category item) { db.Entry(item).State = EntityState.Modified; }
public void Update(Product product) { db.Entry(product).State = EntityState.Modified; }