public IActionResult GetRoute(Guid routeId)
 {
     try
     {
         // var routes may return as a list or just an object...
         var routes = RouteRepo.GetRoute(routeId);
         return(Ok(routes));
     }
     catch (Exception e)
     {
         return(StatusCode(500, _config["StatusCodesText:ServerErr"]));
     }
 }
示例#2
0
        private Route LoadRouteFromDb()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(dbFilePath));

            return(RouteRepository.GetRoute(dbFilePath));
        }
示例#3
0
        public async Task <Route> GetRoute(long routeId, CancellationToken cancellationToken)
        {
            Route route = await _routeRepository.GetRoute(routeId, cancellationToken);

            return(route);
        }
示例#4
0
 public RouteGeoView GetRoute(int id)
 {
     return(rep.GetRoute(id));
 }
示例#5
0
        // GET: Truck/Details/5
        public ActionResult Details(int id)
        {
            var route = routeRepository.GetRoute(id);

            return(View(route));
        }