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.
精彩评论