开发者

NHibernate.ISession does not contain a definition for Linq

开发者 https://www.devze.com 2023-02-06 07:32 出处:网络
I\'m using NHibernate latest builds but unable to work with linq. I already added using NHibernate.Linq, so that\'s not the issue.

I'm using NHibernate latest builds but unable to work with linq. I already added using NHibernate.Linq, so that's not the issue.

using (ISession session = NHibernateHelper.OpenSession())
{
    var sss = session.Linq<Category>().ToArray(); <-- Er开发者_如何学Cror mentioned above.
}

Looks like there is no extention method Linq() for ISession, despite the fact thath NHibernate.Linq is in uses list. Any idea?

Thanks


session.Linq<T>() is for the contrib provider for NHibernate 2.x

session.Query<T>() is for the built-in provider in NHibernate 3.x

0

精彩评论

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

关注公众号