I see many examples of using Linq to NH like this:
ISession session = getSession();
var query = from conference in session.Linq<Conference>()
But in my code there is no .Linq on ISession.
is the following Using not enough?
using NHibernate.Linq;
You are importing the right namespace, but using the wrong method on
ISessioninterface. Instead ofISession.Linq<T>(), useISession.Query<T>().ISession.Linq<T>()was a part of Linq 2 NHibernate, a separate project that was somewhat temporary solution. It was based on Criteria API. It’s now obsolete.The new NHibernate Linq provider is now a part of main NHibernate assembly (as of NH 3.0). It’s based on HQL and has a lot more features.