How to convert the following query over to linq?

210 Views Asked by At

I'm new to nhibernate 3.0:

I got 3 objects (not code just description)

class a{ prop b; }

class b{ prop c }

class c{ long id }

I wrote the following query over code

session.QueryOver<a>().
JoinQueryOver<b>(a1 => a1.b, JoinType.LeftOuterJoin).
JoinQueryOver<c>(b1 => b1.c, JoinType.LeftOuterJoin).
Where(c1=>c1.id == someNumber);

and i get exactly the query I expected to get!

Is it possible to write it in linq ? how ?

1

There are 1 best solutions below

0
On BEST ANSWER

Left joins are not yet supported in the LINQ provider.