Beispiel #1
0
 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));
 }
Beispiel #2
0
 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));
 }
Beispiel #3
0
 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"));
 }