示例#1
0
        public static Airport RestoreAirport(AirportStatus airport)
        {
            Airport restoredPort = new Airport((builder) =>
            {
                builder.RestoreAirport(airport.Stations, airport.Routes);
            }, airport.Name, airport.ImageUrl);

            return(restoredPort);
        }
示例#2
0
 public DbAirport ConvertAirport(AirportStatus commonAirport)
 {
     return(new DbAirport()
     {
         Id = commonAirport.Id,
         Name = commonAirport.Name,
         Stations = ConvertStations(commonAirport.Stations).ToList(),
         ImageUrl = commonAirport.ImageUrl,
         Routes = ConvertRoutes(commonAirport.Routes),
     });
 }
示例#3
0
 public Airport ConvertAirport(AirportStatus commonAirport)
 {
     return(Airport.RestoreAirport(commonAirport));
 }
        public Airport ConvertAirport(DbAirport dbAirport)
        {
            AirportStatus commonAirport = this.commonToDbConvert.ConvertAirport(dbAirport);

            return(this.logicToCommon.ConvertAirport(commonAirport));
        }