I have created a ViewComponent, where it gets the search string parameter to search through Umbraco content. I have implemented the search and the possible results are of IEnumerable. This part is tested and it works.
The problem that I have is how to cast this IEnumerable into possibly more Backoffice models (ModelsBuilder C# classes)?
Another question, why doesn't Intellisense work with IPublishedContent?
Thanks for all the help!

if you know the Document Type of the content coming from the search, and it's all the same results, you can use the following:
assuming
results === IEnumerable<IPublishedContent>But quite often the results you get back from a search consist of several different Document Types, in which case you can do something like this when rendering them out: