private Hiker FindCurrentHiker() // Find AspNetUsers Application Id and match with logged in hiker { string currentHiker = _userService.FindRegisteredUserId(); Hiker hiker = _hikerService.GetHikers().Where(h => h.ApplicationId == currentHiker).FirstOrDefault(); return(hiker); }
// GET: HikerController public ActionResult Index() { try { List <Hiker> hikers = _hikerService.GetHikers(); return(View(hikers)); } catch (Exception ex) { return(View(ex.Message)); } }