예제 #1
0
        public HashSet <MyTextValue> GetDepositSummaryList()
        {
            string key = "DEPOSIT_SUMMARY";

            if (null == _Cache[key])
            {
                HashSet <MyTextValue> categories = new HashSet <MyTextValue>();
                CacheItemPolicy       policy     = CreateCacheItemPolicy();

                var query =
                    DepositSummary.GetAll()
                    .Select(x => new MyTextValue
                {
                    Text     = x.Text,
                    Value    = x.Value,
                    Disabled = true
                }
                            ).ToList();

                categories = new HashSet <MyTextValue>(query);
                _Cache.Set(key, categories, policy);
            }

            return((HashSet <MyTextValue>)_Cache[key]);
        }