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

            if (evnt != null)
            {
                return(evnt);
            }
            evnt = dataContext.spEvent_Consigned(user_id).ToList();
            if (evnt.Count() > 0)
            {
                dco.Data = evnt;
                CacheRepository.Add(dco);
            }
            return(evnt);
        }