Ejemplo n.º 1
0
        public async Task <PagedData <BetRow> > HandleAsync(GameHistoryQuery query)
        {
            var data = await _repository.GetUserGameHistory(query.UserId, query.PageNumber, query.Take)
                       ?? throw new UserNotFoundException();

            var numberOfRows = await _repository.GetNumberOfBets(query.UserId);

            return(new PagedData <BetRow>(data, numberOfRows));
        }
 public async Task <PagedData <BetRow> > GetUserGameHistory(GameHistoryQuery query)
 => await _queryBus.ExecuteAsync(query);