ToPageContent() public static method

public static ToPageContent ( PageContentEntity entity ) : PageContent
entity PageContentEntity
return PageContent
        public PageContent GetPageContentByPageIdAndVersionNumber(int id, int versionNumber)
        {
            PageContentEntity entity = PageContents.FirstOrDefault(p => p.Page.Id == id && p.VersionNumber == versionNumber);

            return(FromEntity.ToPageContent(entity));
        }
Beispiel #2
0
        public PageContent GetLatestPageContent(int pageId)
        {
            PageContentEntity entity = PageContents.Where(x => x.Page.Id == pageId).OrderByDescending(x => x.EditedOn).FirstOrDefault();

            return(FromEntity.ToPageContent(entity));
        }
        public PageContent GetPageContentById(Guid id)
        {
            PageContentEntity entity = PageContents.FirstOrDefault(p => p.Id == id);

            return(FromEntity.ToPageContent(entity));
        }