public ActionResult Edit([Bind(Include = "ListID,ListName")] List list) { if (ModelState.IsValid) { db.Entry(list).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(list)); }
public ActionResult Edit([Bind(Include = "ItemsID,ItemName,Description,DueDate,IsDone,Priority,ListID")] Item item) { if (ModelState.IsValid) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ListID = new SelectList(db.Lists, "ListID", "ListName", item.ListID); return(View(item)); }