Reputation: 49
How can I do this :
string queryString = @"from c in Stuffs select c";
IQueryable<Stuffs> q = StringToIQueryable(queryString);
Upvotes: 0
Views: 2601
Reputation: 6898
See dynamic linq library from Scott Gu that describes how to compose predicates of a linq query from strings. I'm not sure if it's possible to pass a whole linq query but with some custom parsing you should achieve what you want!
Upvotes: 1