public async Task <ActionResult <decimal> > GetSpendingOfUser(Guid userId, [FromQuery] GetSpendingOfUser query) => await Dispatcher.QueryAsync(query.Bind(q => q.UserId, userId));
public async Task <decimal> GetSpendingOfUser(GetSpendingOfUser query) => await query.Apply(_dbContext.SpendingOfUsers.AsQueryable()).Select(sp => sp.Amount).SumAsync();