Esempio n. 1
0
 public Country GetCountry(CountryKey key)
 {
     Country country = null;
     string cacheKey = key == null ? "CountryKey_null" : key.GetCacheKey();
     if (key != null && !TryGetCacheData(cacheKey, out country))
     {
         country = GetCountryManager().GetCountry(key);
         SetCacheData(_cacheName, cacheKey, country);
     }
     return country;
 }
Esempio n. 2
0
        /// <summary>
        /// Get data in database
        /// </summary>
        /// <param name="key">Primary Key</param>
        /// <returns>read data</returns>
        public Country Get(CountryKey key)
        {
            if (key == null || key.Id == 0)
                return null;

            var row = _dbContext.Country.Where(m => m.Id == key.Id).FirstOrDefault();
            if (row != null)
            {
                return CountryTransformer.ToBean(row);
            }
            return null;
        }
Esempio n. 3
0
 internal Country GetCountry(CountryKey key)
 {
     return _module.Get(key);
 }