Example #1
0
        public List <City> GetAllCities()
        {
            var business = CityBusiness.Instance;
            var request  = new GetAllCitiesRequest(this.Context);
            var cities   = business.GetAllCities(request);

            return(cities);
        }
Example #2
0
        public List <City> GetAllCities(GetAllCitiesRequest request)
        {
            List <City> cities = null;

            if (request != null)
            {
                var dataAccess = new CityDataAccess(request.Context);

                var citiesQuery = dataAccess.GetAll();

                citiesQuery = citiesQuery.Include(c => c.State);

                cities = citiesQuery.ToList();
            }

            return(cities);
        }