public IActionResult RoutesTable() { var routesView = new RouteViewModel() { Routes = routeService.GetAllRoutes() }; return(PartialView("_RoutesTablePartial", routesView)); }
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); }
public IEnumerable <Route> Get() { return(service.GetAllRoutes()); }
public List <RouteModel> GetAll() { return(_service.GetAllRoutes()); }