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)); }
public async Task <IEnumerable <ConditionsResponse> > Handle(GetConditionsQuery request, CancellationToken cancellationToken) { return(_mapper.Map <IEnumerable <ConditionsResponse> >(await _conditionRepository.GetConditions())); }