开发者

nHibernate Linq join support; The method Join is not implemented

开发者 https://www.devze.com 2023-01-15 07:48 出处:网络
I am using the latest nHibernate.Linq 2.1.2. But if I use join in my linq query I will get run time error

I am using the latest nHibernate.Linq 2.1.2. But if I use join in my linq query I will get run time error

"The method Join is not i开发者_如何转开发mplemented"

Is join supported by nHibernate.Linq and if it is supported what is the cause of this error?


Doesn't look like Joins are supported in the current version of Linq to Hibernate.

See post from Adam Aldrich's Blog here

I worked around it using two linq queries within my session. The first one selected from the one table and the second from the second table using the values of the first result to constrain my query. Not as efficient as a Join, but since the data I was using was minimal, it worked fine.

You could also try using the Criteria API or HQL.

0

精彩评论

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