Where is the NHibernate 3.1 Session Query Method?

I am at least new to NHibernate.

I am using NHibernate 3.1, and I am trying to implement a shared repository using a generic session request method. However, I do not see this in my Visual Studio IDE Intellisense. I can only see QueryOver, and I'm not sure if it will replace the Query method. If so, why didn’t they leave a request, but with a message that it was outdated in accordance with the agreement?

Please help - I will be forever grateful.

Thanks a lot to the SOF community

+6
source share
1 answer

It is not out of date. They are different. session.Query<T>() allows you to use the LINQ provider, and QueryOver is another API, also based on Expression, but actually more similar to the criteria API.

As you already figured out, you need to open the NHibernate.Linq namespace to use the LINQ provider.

+13
source

Source: https://habr.com/ru/post/886430/


All Articles