Example #1
0
        public Dictionary <string, string> GetSettingValuesByKeys(string keys)
        {
            SettingDataProvider settingDataProvider = new SettingDataProvider();
            DataSet             dataSet             = settingDataProvider.GetSettingsValueByKeys(keys);

            return(DataSetToDictionary(dataSet));
        }
Example #2
0
        /// <summary>
        /// Loads all the cache settings in the memory
        /// </summary>
        public void CacheAllSettings()
        {
            SettingDataProvider settingDataProvider = new SettingDataProvider();
            DataSet             dataSet             = settingDataProvider.GetAllCachaleSettings();
            CacheHelper         cacheHelper         = new CacheHelper(_memoryCache);

            cacheHelper.SetObjectValue(SettingKeys.SettingList, DataSetToDictionary(dataSet));
        }
Example #3
0
        public async Task <string> GetSettingValueByIndividualKey(string settingKey)
        //public string GetSettingValueByIndividualKey(string settingKey)
        {
            string value = string.Empty;

            try
            {
                SettingDataProvider settingDataProvider = new SettingDataProvider();
                KeyValue            objValue            = await settingDataProvider.GetSettingValueByKey(settingKey);

                if (objValue != null && objValue.Value != null)
                {
                    value = objValue.Value;
                }
            }
            catch
            {
                throw;
            }
            return(value);
        }
Example #4
0
        public async Task <int> SettingValueUpdate(string settingKey, string settingValue)
        {
            SettingDataProvider settingDataProvider = new SettingDataProvider();

            return(await settingDataProvider.SettingValueUpdate(settingKey, settingValue));
        }