//GetHomepageImages public List <HomepageImage> GetHomePageImages(Consts.HomepageImageType imgtype) { var dco = new DataCacheObject(DataCacheType.REFERENCE, DataCacheRegions.HOTNEWS, "GETHOMEPAGEIMAGES", new object[] { }, CachingExpirationTime.Minutes_05); var result = _cacheRepository.Get(dco) as List <HomepageImage>; if (result != null && result.Any()) { return(result.Where(r => r.IsEnabled && r.ImgType == (byte)imgtype).ToList()); } result = _dataContext.spImages_Homepage().ToList(); if (result.Any()) { dco.Data = result; _cacheRepository.Add(dco); } return(result.Where(r => r.IsEnabled && r.ImgType == (byte)imgtype).ToList()); }