Пример #1
0
        public async Task <IActionResult> GetConditions()
        {
            var query       = new GetConditionsQuery();
            var queryResult = await _mediator.Send(query);

            var result = _mapper.Map <IEnumerable <ConditionResponseModel> >(queryResult);

            return(Ok(result));
        }
Пример #2
0
 public async Task <IEnumerable <ConditionsResponse> > Handle(GetConditionsQuery request, CancellationToken cancellationToken)
 {
     return(_mapper.Map <IEnumerable <ConditionsResponse> >(await _conditionRepository.GetConditions()));
 }