简体   繁体   中英

How can I make a console application that lets me enter LINQ expressions and my program will execute them?

How can I write a console application that prompts me and lets me enter LINQ expressions and it will spit out the results of that LINQ query?

What would be the easiest way to parse/evaluate a incoming string as a LINQ expression?

Console app is to awkward to use for thousands of reasons. Try LinqPad

I wrote LinqFilter for something similar to this purpose. It does no parsing of LINQ query expressions on its own, but rather sends the code off to the C# v3.5 compiler via Microsoft.CSharp.CSharpCodeProvider to compile into a dynamic assembly and executes the compiled method containing the query. If you were looking for a more interactive approach to designing LINQ queries over databases, LinqPad would be the better tool.

使用Dynamic LINQ查询库,请参阅此内容

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM