> > Put it this way - the compiler works exactly the same way with LINQ to
> > SQL, so do you believe *that* handles it? This is certainly an issue
> > with DbLINQ, *not* with the C# compiler.
>
> So you can confirm, that Linq-SQL can evaluate this expression, right ?
It's as easy for you to try as it is for me - easier, as you know the
real context of your code. However, I've certainly done similar things
without any problem.
However, I can certainly confirm that the expression tree *won't* just
contain "comp.ID" as a string.
> If So I must study passed expression tree a bit more.
> Where to find some Linq provider sample code which resolves local object
> references line comp.ID to values?
I think you'll find it simple when you look at the actual expression
tree.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk