public ActionResult Edit([Bind(Include = "developerID,developerName,hqLocation,description")] Developer developer) { if (ModelState.IsValid) { db.Entry(developer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(developer)); }
public ActionResult Edit([Bind(Include = "ownerID,firstName,lastName,email,phone")] Owner owner) { if (ModelState.IsValid) { db.Entry(owner).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(owner)); }
public ActionResult Edit([Bind(Include = "consolesID,consoleName,releaseDate,description,developerID")] Consoles consoles) { if (ModelState.IsValid) { db.Entry(consoles).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.developerID = new SelectList(db.developer, "developerID", "developerName", consoles.developerID); return View(consoles); }
public ActionResult Edit(Game game, int GenreId) { if (GenreId != 0) { _db.GameGenre.Add(new GameGenre() { GenreId = GenreId, GameId = game.GameId }); } _db.Entry(game).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }