public async Task <GetExchangeRateModel> GetExchangeRates([FromServices] IMediator mediator, CancellationToken cancellationToken, string currencyIsoCode = "USD", string startDate = "2012-01-01", string endDate = "2012-01-10") { var getExchangeRateQuery = new GetExchangeRateQuery(currencyIsoCode, startDate, endDate); return(await mediator.Send(getExchangeRateQuery, cancellationToken)); }
public async Task <IActionResult> GET_COMPANY_EXCHANGE([FromQuery] GetExchangeRateQuery query) { return(Ok(await _mediator.Send(query))); }