public ActionResult Edit([Bind(Include = "Id,Sum,DateCreated,IsPaid")] ShoppingCart shoppingCart) { if (ModelState.IsValid) { db.Entry(shoppingCart).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shoppingCart)); }
public ActionResult Edit([Bind(Include = "Id,Name,Author,Description,Year,Price")] Book book) { if (ModelState.IsValid) { db.Entry(book).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(book)); }