Beispiel #1
0
 public List<City> FindCities(CityCriteria criteria = null)
 {
     List<City> cityList = null;
     string cacheKey = criteria == null ? "CityCriteria_null" : criteria.GetCacheKey();
     if (!TryGetCacheData(cacheKey, out cityList))
     {
         cityList = GetCityManager().FindCities(criteria);
         SetCacheData(_cacheName, cacheKey, cityList);
     }
     return cityList;
 }
Beispiel #2
0
        /// <summary>
        /// Find data in database
        /// </summary>
        /// <returns></returns>
        public List<City> Find(CityCriteria cityCriteria = null)
        {
            List<City> resultList = null;
            IQueryable<CityRow> rowList = _dbContext.City;
            CriteriaTransformer.CompleteQuery(ref rowList, cityCriteria);

            if (rowList != null && rowList.Count() > 0)
            {
                resultList = new List<City>();
                foreach (var row in rowList)
                {
                    resultList.Add(CityTransformer.ToBean(row));
                }
            }
            return resultList;
        }
Beispiel #3
0
 public List<City> FindCities(CityCriteria cityCriteria = null)
 {
     return _module.Find(cityCriteria);
 }