コード例 #1
0
        public IActionResult RoutesTable()
        {
            var routesView = new RouteViewModel()
            {
                Routes = routeService.GetAllRoutes()
            };

            return(PartialView("_RoutesTablePartial", routesView));
        }
コード例 #2
0
        private List <SelectListItem> GetRouteList()
        {
            var routes = routeService.GetAllRoutes();
            List <SelectListItem> routesNames = new List <SelectListItem>();

            foreach (var route in routes)
            {
                var text = route.Vehicle.Name + " " + route.StartTime;
                routesNames.Add(new SelectListItem(text, route.Id.ToString()));
            }
            return(routesNames);
        }
コード例 #3
0
 public IEnumerable <Route> Get()
 {
     return(service.GetAllRoutes());
 }
コード例 #4
0
 public List <RouteModel> GetAll()
 {
     return(_service.GetAllRoutes());
 }