views:

1476

answers:

4

I've been looking for a good tutorial on Expression trees (C#) for a while, but no luck so far. Most of the stuff I've found on the Web was too high level and very basic. Does anyone know some decent tutorial that goes beyond the fundamentals?

+7  A: 

Maybe this will help you. It's a tutorial about writing own linq provider, expression trees are one of the most important part here, so it shows two things simultaneously, which is - linq provider and expr. trees.

Ravadre
Yes, it looks very promising, thanks.
+3  A: 

Check out Bart De Smet's B# blog, he is a crazy genius who loves his expression trees. Also you might want to look at the source of some software that use expression trees extensively, for example Moq.

Matt Howells
+4  A: 

The best way to learn about Expression trees is using LinqPad IMHO. Also check out their WebSite, they've written a great book about LINQ (for which they actually wrote LinqPad)

[1]: LinqPad Homepage

Johannes Rudolph
How does Linqpad help you learn about expression trees?
Robert Harvey
Did you actually check their WebSite? First, there are Tons of examples shipping with LinqPad so you can see how the Linq Queries are translated into ExpressionTrees (Press the lamda button). Second it provides you with a Script Language experience like sandbox to experiment in. Third it also includes PredicateBuilder which is a great example to Show how Expression trees can be modified.
Johannes Rudolph
+1  A: 

Check this post. The author does well to compare it Linq with NHibernate. http://rapidapplicationdevelopment.blogspot.com/2008/03/expression-trees-why-linq-to-sql-is.html

Abhi