Beispiel #1
0
        public async Task <IActionResult> GetRoute(string originStationName, string destinationStationName, TimeSpan leavingAfter, string primaryStations)
        {
            RouteFinder  routeFinder = new RouteFinder(_context);
            List <Train> trains      = routeFinder.GetTrains(originStationName, destinationStationName, leavingAfter);

            ViewBag.originStationName      = originStationName;
            ViewBag.destinationStationName = destinationStationName;
            ViewBag.primaryStations        = primaryStations;
            return(View(trains));
            //return View(ticket);
        }