public async Task <IActionResult> ListMovies([FromQuery] MovieOptions options) { var response = await _movieService.GetMovieListAsync(new Services.GetMovieListRequest { Options = _mapper.Map <Services.MovieOptions>(options) }); return(this.OkWithPageHeader( items: _mapper.Map <IPagedCollection <Movie> >(response), routeName: nameof(ListMovies), queryParams: options, urlHelper: Url)); }
public async Task <MovieList> GetMovies(MovieOptions?options) { if (options is null) { options = MovieOptions.Default; } var response = await _movieService.GetMovieListAsync(new Services.GetMovieListRequest { Options = _mapper.Map <Services.MovieOptions>(options) }); return(_mapper.Map <MovieList>(response)); }