示例#1
0
        private static CatalogEntryDto.CatalogEntryRow GetEntryRowForLineItem(LineItem lineItem)
        {
            CatalogEntryDto.CatalogEntryRow retVal = null;
            // Remove cache before proceeding
            var    responseGroup = new CatalogEntryResponseGroup(CatalogEntryResponseGroup.ResponseGroup.CatalogEntryFull);
            string cacheKey      = CatalogCache.CreateCacheKey("catalogentry", responseGroup.CacheKey, lineItem.CatalogEntryId.ToString());

            CatalogCache.Remove(cacheKey);

            // Now get the entry
            CatalogEntryDto entryDto = CatalogContext.Current.GetCatalogEntryDto(lineItem.CatalogEntryId, responseGroup);

            if (entryDto != null)
            {
                retVal = entryDto.CatalogEntry.FirstOrDefault();
            }

            return(retVal);
        }