Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John 18 posts 74 karma points c-trib
    Jul 17, 2015 @ 06:59
    John
    0

    Which is the best way to find content by Id?

    Which is better?

       protected override IPublishedContent FindContent(RequestContext requestContext, UmbracoContext umbracoContext)
            {
                var helper = new UmbracoHelper(umbracoContext);
                returnhelper.TypedContent(_pageId);
            }
    

    Or

       protected override IPublishedContent FindContent(RequestContext requestContext, UmbracoContext umbracoContext)
            {
                return umbracoContext.ContentCache.GetById(_pageId); 
            }
    

    or another way?

Please Sign in or register to post replies

Write your reply to:

Draft