Ejemplo n.º 1
0
        public static City FromDCityToCity(DCity dCity)
        {
            City city = new City(dCity.Name, dCity.Population, FromDCountryToCountry(dCity.BelongsTo))
            {
                Id = (uint)dCity.Id
            };

            if (dCity.CapitalFrom != null)
            {
                city.CapitalFrom = FromDCountryToCountry(dCity.CapitalFrom);
            }
            return(city);
        }
Ejemplo n.º 2
0
        public static DCity FromCityToDCity(City city)
        {
            DCity dCity = new DCity
            {
                Name       = city.Name,
                Population = city.Population,
                BelongsTo  = FromCountryToDCountry(city.BelongsTo)
            };

            if (city.CapitalFrom != null)
            {
                dCity.CapitalFrom = FromCountryToDCountry(city.CapitalFrom);
            }
            return(dCity);
        }