I need to implement such query: In C# Linq2Sql Statements this can be written so:
var query = from f1 in Foo
from f2 in Foo
where f1.Id < f2.Id && f1.Value == f2.Value
select f1;
But I wonder how to do this using C# Expressions. I mean something like this:
var query = Foo.Join(...).Select(...);
I see that Join method gives opportunity only to use equal join f1.Id == f2.Id
. But how to write in C# expressions more complex query expressions, where is, for example, such expression as f1.Id < f2.Id
?