public async Task <CountArray <AggregatedOfferDto> > AggregateOffersAsync(OffersFilterDto filter)
        {
            var lobbies = await _lobbyService.AggregateOffersAsync(filter);

            var userOffers = await _userOfferService.AggregateOffersAsync(filter);

            var places = await _placeService.AggregateOffersAsync(filter);

            var allItems = lobbies.Items
                           .Concat(userOffers.Items)
                           .Concat(places.Items);

            var allCount = lobbies.Count + userOffers.Count + places.Count;

            return(new CountArray <AggregatedOfferDto>(allItems.ToArray(), allCount));
        }
Exemple #2
0
 public async Task <CountArray <AggregatedOfferDto> > GetAll()
 {
     return(await _lobbyService.AggregateOffersAsync(new OffersFilterDto()));
 }