public ActionResult Edit([Bind(Include = "ID,Name,doc")] Genre Genre) { if (ModelState.IsValid) { db.ChangeStateToModified <Genre>(Genre); db.SaveChanges(); return(RedirectToAction("Index", "Genre")); } return(View("Edit", Genre)); }
public ActionResult Edit([Bind(Include = "ID,GenreID,Name")] Game Game) { if (ModelState.IsValid) { db.ChangeStateToModified <Game>(Game); db.SaveChanges(); return(RedirectToAction("Index", "Game")); } ViewBag.GenreID = new SelectList(db.Genres, "ID", "Name", Game.GenreID); return(View("Edit", Game)); }