public async Task <IEnumerable <BalanceChange> > Handle(GetUserBalanceChangesQuery request,
                                                                CancellationToken cancellationToken)
        {
            var query = _db.BalanceChanges.Where(w => w.UserId == request.UserId);

            if (request.IncludeAdminUser)
            {
                query = query.Include(w => w.AdminUser);
            }

            return(await query.OrderByDescending(w => w.Id).ToListAsync(cancellationToken: cancellationToken));
        }
Beispiel #2
0
 public async Task <IEnumerable <BalanceChange> > Handle(GetUserBalanceChangesQuery request,
                                                         CancellationToken cancellationToken)
 {
     return(await _db.BalanceChanges.Where(w => w.UserId == request.UserId).ToListAsync(cancellationToken));
 }