public ActionResult Edit([Bind(Include = "MovieId,Title,Description,Rating,ReleaseDate")] Movie movie) { if (ModelState.IsValid) { db.Entry(movie).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movie)); }
public ActionResult Edit([Bind(Include = "ActorId,Name,Surname,DateofBirth")] Actor actor) { if (ModelState.IsValid) { db.Entry(actor).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(actor)); }
public ActionResult Edit([Bind(Include = "MovieId,ActorId")] MovieActor movieActor) { if (ModelState.IsValid) { db.Entry(movieActor).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ActorId = new SelectList(db.Actors, "ActorId", "Name", movieActor.ActorId); ViewBag.MovieId = new SelectList(db.Movies, "MovieId", "Title", movieActor.MovieId); return(View(movieActor)); }