public ActionResult Edit([Bind(Include = "Title,Description,Capacity,Length,RunStart,RunEnd")] Game game) { if (ModelState.IsValid) { db.Entry(game).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(game)); }
public ActionResult Edit([Bind(Include = "Id,Start,Price,SoldOut,Title,Color")] Session session) { if (ModelState.IsValid) { db.Entry(session).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Title = new SelectList(db.Games, "Title", "Tag", session.Title); return(View(session)); }