开发者

How to convert the following query over to linq?

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 ?


Left joins are not yet supported in the LINQ provider.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜