public static List <City> GetAll()
        {
            CityGateway aCityGateway    = new CityGateway();
            List <City> getFullCityList = new List <City>();
            List <City> acityList       = new List <City>();

            acityList = aCityGateway.GetAll();
            foreach (City elemnt in acityList)
            {
                City aCity = new City();
                aCity.cityId       = elemnt.cityId;
                aCity.CityName     = elemnt.CityName;
                aCity.NoOfDwellers = elemnt.NoOfDwellers;
                int CountryId = elemnt.CountryId;
                aCity.Country = aCityGateway.GetCountryName(CountryId);
                getFullCityList.Add(aCity);
            }

            return(getFullCityList);
        }
Пример #2
0
 public List <City> GetAll()
 {
     return(cityGateway.GetAll());
 }
Пример #3
0
        public List <City> LoadCities()
        {
            List <City> cities = cityGateway.GetAll();

            return(cities);
        }