开发者

C#: Runtime Query on Linq-able data

开发者 https://www.devze.com 2023-03-03 21:00 出处:网络
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<&g

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消