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