Esempio n. 1
0
        //GetPastedEventsList
        public List <Event> GetPastedEventsList()
        {
            DataCacheObject dco = new DataCacheObject(DataCacheType.REFERENCE, DataCacheRegions.EVENTS, "GETPASTEDEVENTSLIST",
                                                      new object[] { }, CachingExpirationTime.Hours_01);
            List <Event> result = CacheRepository.Get(dco) as List <Event>;

            if (result != null)
            {
                return(result);
            }
            result = dataContext.spEvent_PastList().ToList();
            if (result.Any())
            {
                dco.Data = result;
                CacheRepository.Add(dco);
            }
            return(result);
        }