private async void GetForecasts() { var forecasts = await ForecastAPIHelper.GetFiveDayForecast(SelectedLocation.Key); FiveDayForecast.Clear(); foreach (var f in forecasts) { FiveDayForecast.Add(f); } }
public HomeController(IConfiguration config, LocationAPIHelper locationAPIHelper, CurrentConditionsAPIHelper currentConditionsAPIHelper, ForecastAPIHelper forecastAPIHelper, ILogger <HomeController> logger) { ViewModel = new HomeViewModel(); _logger = logger; Configuration = config; LocationAPIHelper = locationAPIHelper; CurrentConditionsAPIHelper = currentConditionsAPIHelper; ForecastAPIHelper = forecastAPIHelper; }