public ActionResult DeleteConfirmed(int id) { TestGamesTable testGamesTable = db.TestGamesTables.Find(id); db.TestGamesTables.Remove(testGamesTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,GameID,Title,Description,Year,Rating,GenreID,PublisherID,ProducerID")] TestGamesTable testGamesTable) { if (ModelState.IsValid) { db.Entry(testGamesTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testGamesTable)); }
public ActionResult Create([Bind(Include = "Id,GameID,Title,Description,Year,Rating,GenreID,PublisherID,ProducerID")] TestGamesTable testGamesTable) { if (ModelState.IsValid) { db.TestGamesTables.Add(testGamesTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testGamesTable)); }
// GET: Games/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TestGamesTable testGamesTable = db.TestGamesTables.Find(id); if (testGamesTable == null) { return(HttpNotFound()); } return(View(testGamesTable)); }