public async Task <AboutItem> GetAboutItem(CancellationToken cancellationToken, string entryId) { var entry = await _contentfulClient.GetAsync <Entry>(cancellationToken, entryId); return(new AboutItem { Body = _markdownParser.GetHtmlFromMarkdown(entry.GetString("body")), Title = entry.GetString("title") }); }
private BlogEntry GetBlogEntryFromContentfulEntry(Entry entry) { return(new BlogEntry { Id = entry.SystemProperties.Id, Body = _markdownParser.GetHtmlFromMarkdown(entry.GetString("content")), PublishDateTime = entry.SystemProperties.CreatedDateTime, Title = entry.GetString("title") }); }