// GET Weather: public ActionResult Weather(int id, ForecastIndexViewModel model) { try { model.location = _service.GetLocationById(id); model.Weathers = _service.RefreshWeather(model.location); } catch (Exception) { TempData["error"] = "Sorry, could not get forecast"; } return(View(model)); }