开发者

How to convert the following query over to linq?

开发者 https://www.devze.com 2023-02-13 22:56 出处:网络
I\'m new to nhibernate 3.0: I got 3 objects (not code just description) class a{ prop b; } class b{ prop c

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

精彩评论

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

关注公众号