Skip to content

Commit d92da29

Browse files
NH-3669 - documenting move of Linq Query from extension to plain method of session
1 parent c7119da commit d92da29

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

doc/reference/modules/query_linq.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
for querying with NHibernate.
77
</para>
88
<para>
9-
The Linq provider works as an extension of the <literal>ISession</literal>. It is defined in the
10-
<literal>NHibernate.Linq</literal> namespace, so this namespace has to be imported for using the
11-
Linq provider. Of course, the Linq namespace is still needed too.
9+
<literal>IQueryable</literal> queries are obtained with the <literal>Query</literal> methods used on the
10+
<literal>ISession</literal> or <literal>IStatelessSession</literal>. (Prior to NHibernate 5.0, these
11+
methods were extensions defined in the <literal>NHibernate.Linq</literal> namespace.) A number of
12+
NHibernate Linq extensions giving access to NHibernate specific features are defined in the
13+
<literal>NHibernate.Linq</literal> namespace. Of course, the Linq namespace is still needed too.
1214
</para>
1315
<programlisting><![CDATA[using System.Linq;
1416
using NHibernate.Linq;]]></programlisting>
@@ -65,7 +67,9 @@ using NHibernate.Linq;]]></programlisting>
6567
<para>&nbsp;</para>
6668

6769
<para>
68-
A client timeout for the query can be defined.
70+
A client timeout for the query can be defined. As most others NHibernate specific features for
71+
Linq, this is available through an extension defined in <literal>NHibernate.Linq</literal>
72+
namespace.
6973
</para>
7074
<programlisting><![CDATA[IList<Cat> cats =
7175
session.Query<Cat>()
@@ -453,7 +457,8 @@ if (catCount.Value > 10)
453457
<para>
454458
A Linq query may load associated entities or collection of entities. Once the query is defined, using
455459
<literal>Fetch</literal> allows fetching a related entity, and <literal>FetchMany</literal> allows
456-
fetching a collection.
460+
fetching a collection. These methods are defined as extensions in <literal>NHibernate.Linq</literal>
461+
namespace.
457462
</para>
458463
<programlisting><![CDATA[IList<Cat> oldCats =
459464
session.Query<Cat>()

0 commit comments

Comments
 (0)