예제 #1
0
        // 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));
        }