public ReadRideDTO(BusinessRide ride) : this(ride.Ride) { Carrier = new CarrierDTO(ride.Carrier); ArrivalStation = new StationDTO(ride.ArrivalStation); TakeOfStation = new StationDTO(ride.TakeOfStation); }
public ReadRideDTO(Ride ride, string carrierId, string arrivalStationId, string takeOfStationId) : this(ride) { Carrier = CarrierDataProvider.GetCarrier(carrierId); ArrivalStation = StationDataProvider.Get(arrivalStationId); TakeOfStation = StationDataProvider.Get(takeOfStationId); }
public static Station FromDTO(StationDTO station) { return(new Station() { Id = station.Id, City = station.City, Country = station.Country, Name = station.Name, }); }
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); }
public RideOfCarrierDTO(BusinessRide ride) : this(ride.Ride) { ArrivalStation = new StationDTO(ride.ArrivalStation); TakeOfStation = new StationDTO(ride.TakeOfStation); }
public CardDTO(BusinessCard card) : this(card.Card) { ArrivalStation = new StationDTO(card.ArrivalStation); TakeOfStation = new StationDTO(card.TakeOfStation); }