public IActionResult Dashboard() { //on refresh once after logout if (HttpContext.Session.GetInt32("current_id") == null) { return(RedirectToAction("Index")); } //Dashboard begins ViewBag.User_one = travelFactory.CurrentUser((int)HttpContext.Session.GetInt32("current_id")); ViewBag.User_one_trips = tripsFactory.CurrentUserTrips((int)HttpContext.Session.GetInt32("current_id")); ViewBag.User_Except_trips = tripsFactory.ExceptCurrentUserTrips((int)HttpContext.Session.GetInt32("current_id")); return(View("Dashboard")); }