开发者

What to use for old NHibernate.Linq methods with Nhibernate 3?

开发者 https://www.devze.com 2023-01-26 20:09 出处:网络
I am working on a MVC project, where I have got allot of direction and help getting started from tutorials and other sources.All of which reference the NHibernate.Linq library.However, it appears that

I am working on a MVC project, where I have got allot of direction and help getting started from tutorials and other sources. All of which reference the NHibernate.Linq library. However, it appears that it was removed from the main download source and source I read pointed to it possibly being absorbed by NHibernate 3.

However, the main change is that I was trying to have my repository inherit from NHibernateContext, as well as access the "linq" property off a ISession object.

If Nhibernate.linq is no longer nee开发者_开发百科ded with 3, how do I make the connection between the use of the linq library and not?


Session.Query<YourDomainObjectType>() will give you an IQueryable you can play with. You'll need to use the NHibernate.Linq namespace (included in the NHibernate.dll now). You will also need to add Remotion.Data.Linq.dll to your references.

0

精彩评论

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