Пример #1
0
        public async Task <PagedResult <AnimeSearchEntryDto> > HandleAsync(SearchAnimeQuery query)
        {
            var expression = _animeSearchCriteriaService.BuildExpression(query);

            var entities = await _animeRepository.GetOrderedPageByPopularityAsync(expression);

            return(entities.Map <Anime, AnimeSearchEntryDto>(entities.Results.Select(x => x.ToAnimeSearchEntryDto())));
        }