Copied to clipboard

Flag this post as spam?

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


  • Matthew Hunt 13 posts 35 karma points
    Mar 26, 2013 @ 12:44
    Matthew Hunt
    0

    Working with IPublishedContent

    Confused.

    I'm in the process of migrating a site from 4.x to 6.x and from webforms to MVC.

    I have a class that pulls data from examine and  for each result it creates a INode and the returns IEnumerable<INode>. Now I'd like to return IEnumerable<IPublishedContent> from this method so I can pass straight to my view to handle, but I've no idea what the equivilent to new Node(123) would be.

    Am I missing something?!

     

  • Matthew Hunt 13 posts 35 karma points
    Mar 26, 2013 @ 12:54
    Matthew Hunt
    0

    ..... I've found that I can get instances of IPublishedContent from UmbracoHelper, but I don't want to have to pass round the umbraco context everywhere, that seems stupid to me.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 26, 2013 @ 13:58
    Dave Woestenborghs
    0

    I think you can use Umbraco.TypedContent(nodeid)

    Dave

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Mar 26, 2013 @ 14:03
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies