That small piece of SQL isn't doable in Linq. The main reason is that the Microsoft designers of Linq didn't design it as a set oriented system but as a series of sequences. 'join' was also not part of Linq till after the first CTP after massive feedback. the major mistake in Linq's join is that it doesn't support a join operator. It's always an equijoin. If you don't want that, you have to define a double from clause with a where, but that leads to a cross-join + where which is less efficient in many cases. Using a DefaultIfEmpty() (which is one of the most stupid constructs ever created in computer programming) you can bend the equ join to a left join (never a right join!)... It's really silly. If they would have allowed things like:
from c in metaData.E1
join o in metaData.E2 on c.SomeField > o.SomeField
...
everything would be great. The expression results to a binary expression and everything is parsable easily.
it's just stupid, I can't declare it otherwise. The where you specify in the join is pulled out of it, otherwise it otherwise the query isn't convertible in all cases.