public async Task <PaginatedResult <ShowDto> > GetShowsAsync(GetShowsWithCastQuery query) { var totalItemsCount = await _repository.CountShowsAsync(); var items = await _repository.GetShowsWithPagingAsync(query.PageNumber, query.PageSize); return(new PaginatedResult <ShowDto>(ShowsToDto(items), query.PageNumber, query.PageSize, totalItemsCount)); }