Request all titles by actor using LINQ to Netflix OData

Posted by Mark Heath on Stack Overflow See other posts from Stack Overflow or by Mark Heath
Published on 2010-06-03T10:59:58Z Indexed on 2010/06/03 11:04 UTC
Read the original article Hit count: 1096

Filed under:
|
|

I'm experimenting with LINQPad to use LINQ to query the Netflix OData. I'm trying to search for all films with a particular actor in. For example:

from t in Titles 
from p in t.Cast
where p.Name == "Morgan Freeman"
select t.Name

this results in:

NotSupportedException: Can only project the last entity type in the query being translated

I also tried:

from p in People
from t in p.TitlesActedIn
where p.Name == "Morgan Freeman"
select t.Name

which results in the following error:

NotSupportedException: The method 'Select' is not supported

I've tried a few other approaches, such as using Id's in the where clause, and selecting different things, but have got nowhere.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about OData