public ActionResult ShowRoute(SearchDetailViewModel vm) { if (vm.DepartureStop == 0 | vm.ArrivalStop == 0) { return(View(nameof(Index))); } long startTime = TimeHelpers.ParseDateTimeToUnix(vm.Time, (int)vm.DayOfWeek); AStar star = new AStar(ts); var pathFound = star.FindPath(vm.DepartureStop, vm.ArrivalStop, startTime, vm.ForwardSearch); if (pathFound == null) { // TODO: Not Found page skal laves! return(Content("Not Found!")); } var constructRoutePath = new ConstructRoutePath(ts); var fatPath = constructRoutePath.GetRoutePath(pathFound); return(View(fatPath)); }