Esempio n. 1
0
        public int Count(UserEntity UserEntity, SearchCityEntity SearchCityEntity)
        {
            if (SearchCityEntity == null)
            {
                SearchCityEntity = new SearchCityEntity();
            }
            IQueryable <City> Cities = CinemasEntities.Cities;

            Cities = SearchCityEntity.ApplyTo(Cities);
            return(Cities.Count());
        }
Esempio n. 2
0
        public List <CityEntity> Gets(UserEntity UserEntity, SearchCityEntity SearchCityEntity)
        {
            if (SearchCityEntity == null)
            {
                SearchCityEntity = new SearchCityEntity();
            }
            IQueryable <City> Cities = CinemasEntities.Cities;

            Cities = SearchCityEntity.ApplyTo(Cities);
            Cities = SearchCityEntity.SkipAndTake(Cities);
            return(Cities.ToList().Select(c => new CityEntity(c)).ToList());
        }