Пример #1
0
        private static SystemConfig SetRules(bool set)
        {
            SystemConfig sr = ( SystemConfig )ContextExtensions.GetCachedData("SR_ca");

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

            using (SystemConfigService service = new SystemConfigService())
            {
                sr = service.List().FirstOrDefault() ?? new SystemConfig();

                ContextExtensions.CacheData("SR_ca", sr);
            }

            return(sr);
        }