Hello guys.
I ran into such a problem. I need to return strictly typed related pages. I use pages data type. Example, some page type (Article) has many Videos. How can I receive it in MVC? GetRelatedDocuments returns IEnumerable<TreeNode>, but i need IEnumerable<PageType>. There is no way to convert MultiDocumentQuery to DocumentQuery<T>? Thank you.
GetRelatedDocuments
IEnumerable<TreeNode>
IEnumerable<PageType>
MultiDocumentQuery
DocumentQuery<T>
Which makes sense if you think about it. The MultiDoumentQuery can return results of different types, so there is no way it can cast everything in one turn to type of T. You would need to handle that yourself.
Please, sign in to be able to submit a new answer.