C#: Runtime Query on Linq-able data
This is basically a "can i开发者_C百科t be done" question.
If I have a List<SomeObject>
is there some way to convert a user's string input into a query that can be run against the List<>
? The most obvious example would be having the user enter an SQL query and then running that query on the List<>
. I'm not necessarily interested in executing SQL, but I'm wondering if there is some way to run a linq query without hard coding it. I don't really care what the syntax is like.
Checkout Dynamic Linq. Sounds like that's what you want.
精彩评论