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