public async Task <IEnumerable <WeatherForecastResource> > Get() { var httpClient = new HttpClient(); var client = new WeatherApiClient("https://localhost:5003", httpClient); var forecast = await client.WeatherForecastAsync(); return(forecast.Select(x => new WeatherForecastResource { Date = x.Date.LocalDateTime, TemperatureC = x.TemperatureC, Summary = x.Summary }) .ToArray()); }