public ActionResult DeleteConfirmed(int id) { Movie_Acted movie_Acted = db.Movies_Acted.Find(id); db.Movies_Acted.Remove(movie_Acted); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Movie_ActedID,MovieID,ActorID")] Movie_Acted movie_Acted) { if (ModelState.IsValid) { db.Entry(movie_Acted).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ActorID = new SelectList(db.Actors, "ID", "LastName", movie_Acted.ActorID); ViewBag.MovieID = new SelectList(db.Movies, "MovieID", "MovieName", movie_Acted.MovieID); return(View(movie_Acted)); }
// GET: Movie_Acted/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Movie_Acted movie_Acted = db.Movies_Acted.Find(id); if (movie_Acted == null) { return(HttpNotFound()); } return(View(movie_Acted)); }
// GET: Movie_Acted/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Movie_Acted movie_Acted = db.Movies_Acted.Find(id); if (movie_Acted == null) { return(HttpNotFound()); } ViewBag.ActorID = new SelectList(db.Actors, "ID", "LastName", movie_Acted.ActorID); ViewBag.MovieID = new SelectList(db.Movies, "MovieID", "MovieName", movie_Acted.MovieID); return(View(movie_Acted)); }