public async Task <IActionResult> GetAll() { var query = new GetAllWeatherForecastQuery(); var result = await _mediator.Send(query); return(Ok(result)); }
public async Task <List <WeatherForecastResponse> > Handle(GetAllWeatherForecastQuery request, CancellationToken cancellationToken) { var result = await _weatherForcastService.GetAllAsync(); return(_mapper.Map <List <WeatherForecastResponse> >(result)); }