public Task <WeatherForecast[]> GetForecastAsync(DateTime startDate) { var channel = GrpcChannel.ForAddress("https://localhost:5001"); var client = new Greeter.GreeterClient(channel); DataReply response = client.GetData(new DataRequest() { Name = "Berlin" }); RootObject res = Newtonsoft.Json.JsonConvert.DeserializeObject <RootObject>(response.Message); List <WeatherForecast> lstWeatherForecast = new List <WeatherForecast>(); foreach (Location local in res.observations.location) { foreach (Observation obs in local.observation) { WeatherForecast oWeather = new WeatherForecast(); oWeather.Date = res.feedCreation; oWeather.TemperatureC = obs.temperature; oWeather.Summary = string.Format("latitude {0}, longitude {1}", local.latitude, local.longitude); lstWeatherForecast.Add(oWeather); } } return(Task.FromResult(lstWeatherForecast.ToArray())); }