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.
..... 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.
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?!
..... 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.
I think you can use Umbraco.TypedContent(nodeid)
Dave
For more info see this topic: http://our.umbraco.org/forum/developers/api-questions/37894-new-Dynamic(id)-and-new-Node(id)-equiv-in-v6
Jeroen
is working on a reply...