Dynamic Linq query issue
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-04-22T02:40:19Z
Indexed on
2010/04/22
2:43 UTC
Read the original article
Hit count: 312
Hey All, Im trying to query the Netflix OData feed. I have the following query that works fine in LinqPad:
from g in Genres from t in g.Titles where g.Name == "Horror" && t.AverageRating == 2 && t.ReleaseYear == 2004 select t
But, when I move it over to my Silverlight app, the user selects what to search on so I may or may not have all of the params. That being the case, I need to construct the query at runtime. Ive looked the the Dynamic Query stuff and that will do fine...the issue that I have is that I need an initial acceptable query to append to and this doesn't fly:
from g in Genres from t in g.Titles select t;
Any additional thoughts would be appreciated. Thanks in advance
© Stack Overflow or respective owner