ihatemash
ihatemash

Reputation: 1494

How to execute a dynamic LINQ expression

Is it possible to dynamically buld and execute a LINQ expression? I.e. I have a collections of items that i want to query using LINQ but i want to create the LINQ statement at runtime and execute that LINQ query on my collection like this:

var myLINQExpression = GetLINQStatementFromFile(queryListFile);

var queryResult = myCollection.Where(myLINQExpression);

Upvotes: 1

Views: 1714

Answers (1)

fearofawhackplanet
fearofawhackplanet

Reputation: 53396

try dynamic linq.

Upvotes: 3

Related Questions