public ActionResult Edit(Category category) { _db.Entry(category).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }
public Item Edit(Item item) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return(item); }
public ActionResult Edit(Item item, int CategoryId) { _db.Entry(item).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Item item) // updates the item after being routed to there by Get method { _db.Entry(item).State = EntityState.Modified; // (item) = routing parameter // Entry () = method, State = property // state updated to EntityState.Modified = tells Entity the entry has been updated _db.SaveChanges(); // once state has been modified, we call SaveChanges return(RedirectToAction("Index")); }
public IActionResult Edit(Item item) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Experience Experience) { db.Entry(Experience).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public void Update(Classification classification) { db.Entry(classification).State = EntityState.Modified; db.SaveChanges(); }
public void UpdateLabel(Label label) { _db.Entry(label).State = EntityState.Modified; Save(); }
public IActionResult Edit(Item item) { db.Entry(item).State = Microsoft.EntityFrameworkCore.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public void Update(Item item) { _db.Entry(item).State = EntityState.Modified; _db.SaveChanges(); }