// Home/Movie/123123
        public async Task <IActionResult> Movie(string id)
        {
            var result = await movieApiService.SearchByIdAsync(id);

            recentMoviesStorage.AddMovie(result);
            return(View(result));
        }
示例#2
0
        // Home/Movie/123123
        public async Task <IActionResult> Movie(string id)
        {
            var movie = await movieApiService.SearchByIdAsync(id);

            var reviews = await reviewService.GetReviewsAsync(id);

            recentMoviesStorage.AddMovie(movie);

            var model = new MovieDetailsViewModel
            {
                Movie   = movie,
                Reviews = reviews
            };

            return(View(model));
        }