Is there an application to display some kind of query plan for querying a Linq object?

I am looking for an app to display what a linq expression will do, specifically with regards to using multiple access to the same list in a query.

Better yet, the tool will tell you if the linq query is good.

0


source to share


3 answers


I've used the expression tree visualizer in the past to at least help decode what's inside the expression tree. It helps in identifying the parts of the tree and how to convey each part.



+1


source


Well, firstly, I could easily envisage a tool that would parse the query and find that the Where clause is a standard runtime implementation and thus does not learn this method, but "knows" that the execution plan for this method would be, and thus could put together a plan for the entire request.

Until you present a custom Linq provider where the only way to figure out what it will do is to read the code.



Therefore, I believe that there is no such tool, and it is very difficult to make it.

It would be interesting to try, at least for standard classes, it would be a convenient debugging visualizer for Visual Studio.

0


source


How about building a tool?;) Have a
look at expression trees , I think they might be useful

0


source







All Articles