public List <List <TOURNEE_ETAPE> > GetEtapes(LIGNE ligne, ARRET arretDepart, ARRET arretArrivee) { using (TRANSPORT_PUBLICContext context = new TRANSPORT_PUBLICContext()) { List <List <TOURNEE_ETAPE> > returnedValue = new List <List <TOURNEE_ETAPE> >(); var tourneeEtapes = context.TOURNEE_ETAPEs.Where(te => te.PARCOURS_ETAPE.PARCOURS.LIGNE.ID == ligne.ID && te.PARCOURS_ETAPE.ARRET.ID == arretDepart.ID); foreach (var tourneeEtape in tourneeEtapes.OrderBy(p => p.HEURE_REEL)) { List <TOURNEE_ETAPE> listTourneeEtapes = new List <TOURNEE_ETAPE>(); var tourneeEtapeFin = context.TOURNEE_ETAPEs.SingleOrDefault(te => te.ID_TOURNEE == tourneeEtape.ID_TOURNEE && te.PARCOURS_ETAPE.ARRET.ID == arretArrivee.ID); if (tourneeEtapeFin != null) { listTourneeEtapes.Add(tourneeEtape); listTourneeEtapes.AddRange(context.TOURNEE_ETAPEs.Where(te => te.ID_TOURNEE == tourneeEtape.ID_TOURNEE && te.PARCOURS_ETAPE.ORDRE > tourneeEtape.PARCOURS_ETAPE.ORDRE && te.PARCOURS_ETAPE.ORDRE < tourneeEtapeFin.PARCOURS_ETAPE.ORDRE)); listTourneeEtapes.Add(tourneeEtapeFin); returnedValue.Add(listTourneeEtapes); } } return(returnedValue); } }
public RechercheOperation(TRIP_AT_LUXContext contextTrip, TRANSPORT_PUBLICContext contextTransport) { _contextTransport = contextTransport; _contextTrip = contextTrip; }
public TransportPublicArretOperation(TRANSPORT_PUBLICContext context) : base(context) { }
public TransportPublicTourneeEtapeOperation(TRANSPORT_PUBLICContext context) : base(context) { }
public TransportPublicParcoursOperation(TRANSPORT_PUBLICContext context) : base(context) { }
public BaseOperationTransportPublic(TRANSPORT_PUBLICContext context) { _context = context; }