public IList <LegDTO> ToLegDTOs(Itinerary itinerary)
 {
     if (itinerary == null)
     {
         return(new List <LegDTO>());
     }
     return(itinerary.Legs.Select(x => _legDTOAssembler.ToDTO(x)).ToList());
 }
 public RouteCandidateDTO ToDTO(Itinerary itinerary)
 {
     return(new RouteCandidateDTO(itinerary.Legs.Select(x => _legDTOAssembler.ToDTO(x)).ToList()));
 }