Skip to content

Commit 32ed5e0

Browse files
committed
NH-3722 - Remove per-session EntityMode switch capability from documentation
1 parent cc01ffa commit 32ed5e0

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

doc/reference/modules/persistent_classes.xml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -345,33 +345,6 @@ using(ITransaction tx = s.BeginTransaction())
345345
to the NHibernate mapping, the database schema can easily be normalized and sound,
346346
allowing to add a proper domain model implementation on top later on.
347347
</para>
348-
349-
<para>
350-
Entity representation modes can also be set on a per <literal>ISession</literal>
351-
basis:
352-
</para>
353-
354-
<programlisting><![CDATA[using (ISession dynamicSession = pocoSession.GetSession(EntityMode.Map))
355-
{
356-
// Create a customer
357-
var frank = new Dictionary<string, object>();
358-
frank["name"] = "Frank";
359-
dynamicSession.Save("Customer", frank);
360-
...
361-
}
362-
// Continue on pocoSession
363-
]]></programlisting>
364-
365-
366-
<para>
367-
Please note that the call to <literal>GetSession()</literal> using an
368-
<literal>EntityMode</literal> is on the <literal>ISession</literal> API, not the
369-
<literal>ISessionFactory</literal>. That way, the new <literal>ISession</literal>
370-
shares the underlying ADO connection, transaction, and other context
371-
information. This means you don't have to call <literal>Flush()</literal>
372-
and <literal>Close()</literal> on the secondary <literal>ISession</literal>, and
373-
also leave the transaction and connection handling to the primary unit of work.
374-
</para>
375348
</sect1>
376349

377350
<sect1 id="persistent-classes-tuplizers" revision="1">

0 commit comments

Comments
 (0)