public ActionResult Weather(Park park, string Scale) { DetailView detailView = new DetailView(); detailView.park = _dal.ParkByCode(park.ParkCode); detailView.weather = _dal.GetPark5DayForecast(park.ParkCode); if (park.ParkCode == null) { park.ParkCode = Session["ParkCode"] as string; } else { Session["ParkCode"] = park.ParkCode; } if (Scale == null) { Scale = Session["Scale"] as string; } else { Session["Scale"] = Scale; } if (Scale == "true") { foreach (var item in detailView.weather) { item.HighTemp = ((item.HighTemp - 32) * 5 / 9); item.LowTemp = ((item.LowTemp - 32) * 5 / 9); } } return(View("WeatherDetail", detailView)); }