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