//GetCategoryLeafs public List <IdTitle> GetCategoryLeafs(long?category_id) { DataCacheObject dco = new DataCacheObject(DataCacheType.REFERENCE, DataCacheRegions.CATEGORIES, "GETCATEGORYLEAFS", new object[] { category_id }, CachingExpirationTime.Days_01); List <IdTitle> result = CacheRepository.Get(dco) as List <IdTitle>; if (result != null && result.Any()) { return(result); } dataContext.CommandTimeout = 600000; result = (from p in dataContext.spCategory_View_FullCategory(category_id) select new IdTitle { ID = p.Category_ID.GetValueOrDefault(0), Title = p.FullCategory }).ToList(); if (result.Any()) { dco.Data = result; CacheRepository.Add(dco); } return(result); }