public async Task <Result <List <MasterTradingAgreementDto> > > Handle(GetAllMasterTradingAgreementsQuery request, CancellationToken cancellationToken) { var items = await _db.QueryFor <MasterTradingAgreement>().Include(x => x.ContractSchedules) .ProjectTo <MasterTradingAgreementDto>(_mapper.ConfigurationProvider) .OrderBy(t => t.Name) .ToListAsync(cancellationToken); return(Result.Ok(items)); }
public async Task <Result <List <ToDoItemDto> > > Handle(GetAllToDosQuery request, CancellationToken cancellationToken) { var items = await _db.QueryFor <ToDoItem>() .ProjectTo <ToDoItemDto>(_mapper.ConfigurationProvider) .OrderBy(t => t.Title) .ToListAsync(cancellationToken); return(Result.Ok <List <ToDoItemDto> >(items)); }