Пример #1
0
        private async Task <IEnumerable <Page> > GetPages()
        {
            var pages = _cacheService.GetPages();

            if (pages == null)
            {
                var qb = new QueryBuilder <Page>();
                pages = (await CtfClient.GetEntriesByType("pageStandardPage", qb)).Items;
                //.Select(x =>
                //{
                //    x.MainTextHtml = _htmlRenderer.ToHtml(x.MainText).Result;
                //    return x;
                //});
                _cacheService.CachePages(pages);
            }

            return(pages);
        }