예제 #1
0
        public async Task <string> GetSetting(string settingName)
        {
            if (string.IsNullOrEmpty(settingName))
            {
                throw new CallerException("SettingName Cannot Be Blank");
            }

            string settingValue = await Cache.Get <string>(GetCacheKey(settingName));

            if (settingValue != null)
            {
                return(settingValue);
            }

            var settingLogic = new SettingsLogic(Cache, Context);

            settingValue = await settingLogic.GetStrSetting(settingName);

            return(settingValue);
        }
예제 #2
0
        public async Task <ActionResult> Get(string settingname)
        {
            var settingLogic = new SettingsLogic(Cache, Context);

            return(Json(await settingLogic.GetStrSetting(settingname)));
        }