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()); }
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()); }