Exemplo n.º 1
0
 public ReadRideDTO(BusinessRide ride)
     : this(ride.Ride)
 {
     Carrier        = new CarrierDTO(ride.Carrier);
     ArrivalStation = new StationDTO(ride.ArrivalStation);
     TakeOfStation  = new StationDTO(ride.TakeOfStation);
 }
Exemplo n.º 2
0
 public ReadRideDTO(Ride ride, string carrierId, string arrivalStationId, string takeOfStationId)
     : this(ride)
 {
     Carrier        = CarrierDataProvider.GetCarrier(carrierId);
     ArrivalStation = StationDataProvider.Get(arrivalStationId);
     TakeOfStation  = StationDataProvider.Get(takeOfStationId);
 }
Exemplo n.º 3
0
 public static Station FromDTO(StationDTO station)
 {
     return(new Station()
     {
         Id = station.Id,
         City = station.City,
         Country = station.Country,
         Name = station.Name,
     });
 }
Exemplo n.º 4
0
        public static IEnumerable <StationDTO> FromEnitityList(IEnumerable <Station> c)
        {
            List <StationDTO> list = new List <StationDTO>();

            if (c != null && c.Count <Station>() > 0)
            {
                foreach (var el in c)
                {
                    var dto = new StationDTO(el);
                    list.Add(dto);
                }
            }

            return(list);
        }
Exemplo n.º 5
0
 public RideOfCarrierDTO(BusinessRide ride)
     : this(ride.Ride)
 {
     ArrivalStation = new StationDTO(ride.ArrivalStation);
     TakeOfStation  = new StationDTO(ride.TakeOfStation);
 }
Exemplo n.º 6
0
 public CardDTO(BusinessCard card)
     : this(card.Card)
 {
     ArrivalStation = new StationDTO(card.ArrivalStation);
     TakeOfStation  = new StationDTO(card.TakeOfStation);
 }