Пример #1
0
        public static Module LoadSingle(long userId, string id)
        {
            Module toRet;

            if (!CacheHelper.Get(Module + "_" + id.ToUpper(), out toRet))
            {
                var moduleRepository = new ModuleRepository();
                toRet = moduleRepository.LoadSingle(id);
                if (toRet != null)
                {
                    CacheHelper.Add(Module + "_" + toRet.Id, toRet, BlCommon.DefaultTimeOut());
                }
            }
            return(toRet);
        }