public ActionResult Edit([Bind(Include = "ID,Username,Balance")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public void UpdateItem(ShopItem item) { context.Entry(item).State = EntityState.Modified; context.SaveChanges(); }