Ejemplo n.º 1
0
        public async Task <IEnumerable <MovieCardResponseModel> > GetMoviesByGenre(int genreId)
        {
            var movies = await _movieGenreRepository.GetMoviesByGenreIdAsync(genreId);

            var response = movies.Select(m => new MovieCardResponseModel
            {
                Id = m.Id, Title = m.Title, PosterUrl = m.PosterUrl
            });

            return(response);
        }