Пример #1
0
 public static NewTravel ToDomainTravel(DbTravel travel)
 {
     return(new NewTravel
     {
         TravelId = travel.TravelId,
         ArrivalDate = travel.ArrivalDate,
         DepartureDate = travel.DepartureDate,
         Participants = new TravelParticipants
         {
             Children = travel.Children,
             Adults = travel.Adults,
             ChildrenAges = travel.ChildrenAges
         },
         TravelDestination = new TravelDestination
         {
             City = travel.City,
             Country = travel.Country,
         }
     });
 }
Пример #2
0
 public static TravelsResponse ToDomainTravel(DbTravel travel, DbLocation location)
 {
     return(new TravelsResponse
     {
         TravelId = travel.TravelId,
         ArrivalDate = travel.ArrivalDate,
         DepartureDate = travel.DepartureDate,
         Participants = new TravelParticipants
         {
             Children = travel.Children,
             Adults = travel.Adults,
             ChildrenAges = travel.ChildrenAges
         },
         TravelDestination = new TravelDestination
         {
             City = travel.City,
             Country = travel.Country,
         },
         PhotoUrl = location.PhotoUrl
     });
 }