// GET: ParkController/Details/5 public async Task <ActionResult> Details(int id) { Park Park = _parkService.GetParkRecord(id); // Get park of specific ID Park.HikingTrail = _trailService.GetTrails(id); // Get trails that belong to Park with passed ID (Already in database) Park.CurrentWeatherInfo = new CurrentWeatherInfo(); // Instantiate blank spot for data to bind to, sets to object await _restCalls.FetchWeatherApi(Park); return(View(Park)); }
// GET: HikingTrailController public ActionResult Index() { var trails = _hikingTrails.GetTrails(); return(View(trails)); }