Exemple #1
0
        public async Task <IEnumerable <MovieDto> > Handle(GetMovieSetQuery request, CancellationToken cancellationToken)
        {
            var movies = await _movieRepository.GetMoviesBasicSetAsync();

            var list = movies.Select(x => _mapper.Map <MovieDO, MovieDto>(x)).ToList();

            return(list);
        }
 public async Task <IActionResult> GetMovieSetAsync([FromQuery] GetMovieSetQuery getMoviesQuery)
 {
     return(Ok(await _mediator.Send(getMoviesQuery)));
 }