Beispiel #1
0
 public async Task <GetSelectionCriteriaByIdResponse> Handle(GetSelectionCriteriaByIdRequest request)
 {
     return(new GetSelectionCriteriaByIdResponse()
     {
         SelectionCriteria = SelectionCriteriaApiModel.FromSelectionCriteria(await _context.SelectionCriterion.SingleAsync(x => x.Id == request.Id && x.TenantId == request.TenantId))
     });
 }
Beispiel #2
0
            public async Task <GetSelectionCriterionResponse> Handle(GetSelectionCriterionRequest request)
            {
                var selectionCriterion = await _context.SelectionCriterion
                                         .Where(x => x.TenantId == request.TenantId)
                                         .ToListAsync();

                return(new GetSelectionCriterionResponse()
                {
                    SelectionCriterion = selectionCriterion.Select(x => SelectionCriteriaApiModel.FromSelectionCriteria(x)).ToList()
                });
            }