public ActionResult Create(Movie movie)
        {
            //TODO validate model on the server and create new view model different from database model

            db.Movies.Add(movie);
            db.SaveChanges();

            return Json(new { url = Url.Action("Index") });
        }
        public ActionResult Update(Movie movie)
        {
            int id = movie.Id;
            var movieToUpdate = db.Movies.Find(id);
            movieToUpdate.Title = movie.Title;
            movieToUpdate.Year = movie.Year;
            movieToUpdate.Director = movie.Director;
            movieToUpdate.LeadingFemaleRole = movie.LeadingFemaleRole;
            movieToUpdate.LeadingMaleRole = movie.LeadingMaleRole;
            movieToUpdate.AgeLeadingMaleRole = movie.AgeLeadingMaleRole;
            movieToUpdate.AgeLeadingFemaleRole = movie.AgeLeadingFemaleRole;
            movieToUpdate.Studio = movie.Studio;
            movieToUpdate.StudioAddress = movie.StudioAddress;

            db.SaveChanges();

            return RedirectToAction("Index");
        }