public ActionResult MovieDetails(long?Id = null) { if (Id != null) { var movie = _movieController.GetMovieDetails((long)Id); if (movie.Status != System.Threading.Tasks.TaskStatus.Faulted) { ViewBag.Movie = movie.Result; } else { ViewBag.Movie = null; } return(View()); } else { return(RedirectToAction(nameof(Index), "Home")); } }