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 int Save(City city)
        {
            CityGateway cityGateway = new CityGateway();

            return(cityGateway.Save(city));
        }
Пример #3
0
        public List <City> GetAllCity()
        {
            CityGateway cityGateway = new CityGateway();

            return(cityGateway.GetAllCity());
        }