示例#1
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);
        }
 public ActionResult List()
 {
     return(View(CityDataAccess.GetAll()));
 }