views:

57

answers:

3

I'm looking for an application to display what a linq expression would do, in particular regarding the usage of multiple access to the same list in a query.

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

A: 

Well, to begin with, I could easily foresee a tool that would pick a query apart and detect that the Where-clause is the standard runtime implementation, and thus not examine that method, but "know" what the execution plan for that method would be, and could thus piece together a plan for the whole query.

Right up until the point where you introduce a custom Linq provider, where the only way to figure out what it will be doing would be to read the code.

So I daresay there is no such tool, and making one would be very hard.

Would be fun to try though, at least for standard classes, would be a handy debugging visualizer for Visual Studio.

Lasse V. Karlsen
A: 

What about making the tool yourself?! ;)
Take a look at Expression trees, I believe they might be useful

sebastian
Yeah, yeah... I could make the tool myself. I just don't feel the need to create something that might already exists! ;)
Stecy
+1  A: 

I used the expression tree visualizer in the past to at least help decode what is inside of an expression tree. It aids in figureing out the parts of the tree and how gives each part is related.

Mark