public ActionResult Edit(Movie movie, int DirectorId)
 {
     if (DirectorId != 0)
     {
         _db.DirectorMovies.Add(new DirectorMovie()
         {
             DirectorId = DirectorId, MovieId = movie.MovieId
         });
     }
     _db.Entry(movie).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(Director director)
 {
     _db.Entry(director).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }