Skip to content

Commit 3bfbacd

Browse files
authored
Merge pull request #12 from fredericDelaporte/RefDoc5.0
Update reference documentation to 5.0
2 parents 0eb8fa0 + ee2f2e0 commit 3bfbacd

File tree

96 files changed

+42536
-2999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+42536
-2999
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ _site
44
# Common backup files on Linux.
55
*~
66

7+
# Visual Studio user settings directory
8+
.vs
9+
10+
# Visual Studio Code user settings directory
11+
.vscode
12+
13+
# JetBrains Rider IDE user settings directory
14+
.idea

doc/index.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,28 @@
33
title: Documentation
44
---
55
<ul>
6-
<li><a href="/doc/nhibernate-reference/index.html">The NHibernate Reference</a></li>
6+
<li>
7+
<a href="/doc/nhibernate-reference/index.html">The NHibernate Reference</a>
8+
(<a href="/doc/nhibernate-reference/index.html">HTML</a>,
9+
<a href="/doc/nh/en/index.html">single page HTML</a>,
10+
<a href="/doc/nh/en/nhibernate_reference.pdf">PDF</a>,
11+
<a href="/doc/nh/en/nhibernate.reference.chm">CHM</a>)
12+
</li>
713
<li><a href="/doc/nhibernate-features.html">NHibernate Features</a></li>
814
<li><a href="/doc/tutorials/first-nh-app/your-first-nhibernate-based-application.html">Tutorial: Your first NHibernate based application</a></li>
915
</ul>
16+
17+
<h2>Previous Reference</h2>
18+
<ul>
19+
<li>
20+
<a href="/previous-doc/v4.1/ref/index.html">The NHibernate Reference, v4.1</a>
21+
(<a href="/previous-doc/v4.1/ref/index.html">HTML</a>,
22+
<a href="/previous-doc/v4.1/single/index.html">single page HTML</a>)
23+
</li>
24+
<li><a href="/previous-doc/v3.3/single/index.html">The NHibernate Reference, v3.3</a></li>
25+
<li><a href="/previous-doc/v2.1/single/index.html">The NHibernate Reference, v2.1</a></li>
26+
</ul>
27+
1028
<h2>Patterns &amp; Practices</h2>
1129
<ul>
1230
<li><a href="/doc/patternsandpractices/identity-field-equality-and-hash-code.html">Identity Field, Equality and Hash Code</a></li>

doc/nh/en/index.html

Lines changed: 2434 additions & 1482 deletions
Large diffs are not rendered by default.

doc/nh/en/nhibernate.reference.chm

518 KB
Binary file not shown.

doc/nh/en/nhibernate_reference.pdf

995 KB
Binary file not shown.

doc/nhibernate-reference/architecture.html

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
2-
layout:
2+
layout:
33
---
4+
<!doctype html>
45
<html><head>
56
<meta charset="utf-8">
67
<meta name="viewport" content="width=device-width, initial-scale=1" />
78
<meta http-equiv="X-UA-Compatible" content="IE=edge">
89
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
9-
<title>Chapter&nbsp;2.&nbsp;Architecture</title><link rel="stylesheet" href="../shared/css/html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="up" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="previous" href="quickstart.html" title="Chapter&nbsp;1.&nbsp;Quickstart with IIS and Microsoft SQL Server"><link rel="next" href="session-configuration.html" title="Chapter&nbsp;3.&nbsp;ISessionFactory Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;2.&nbsp;Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="quickstart.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="session-configuration.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter&nbsp;2.&nbsp;Architecture</h2></div></div><div></div></div>{% include google_adsense.html %}<div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="architecture-overview"></a>2.1.&nbsp;Overview</h2></div></div><div></div></div><p>
10+
<title>Chapter&nbsp;2.&nbsp;Architecture</title><link rel="stylesheet" href="../shared/css/html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="up" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="previous" href="quickstart.html" title="Chapter&nbsp;1.&nbsp;Quick-start with IIS and Microsoft SQL Server"><link rel="next" href="session-configuration.html" title="Chapter&nbsp;3.&nbsp;ISessionFactory Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;2.&nbsp;Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="quickstart.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="session-configuration.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter&nbsp;2.&nbsp;Architecture</h2></div></div><div></div></div>{% include google_adsense.html %}<div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="architecture-overview"></a>2.1.&nbsp;Overview</h2></div></div><div></div></div><p>
1011
A (very) high-level view of the NHibernate architecture:
1112
</p><div class="mediaobject" align="center"><img src="../shared/images/overview.png" align="middle"></div><p>
1213
This diagram shows NHibernate using the database and configuration data to
@@ -21,7 +22,7 @@
2122
The "full cream" architecture abstracts the application away from the
2223
underlying ADO.NET APIs and lets NHibernate take care of the details.
2324
</p><div class="mediaobject" align="center"><img src="../shared/images/fullcream.png" align="middle"></div><p>
24-
Heres some definitions of the objects in the diagrams:
25+
Here are some definitions of the objects in the diagrams:
2526

2627
</p><div class="variablelist"><dl><dt><span class="term">ISessionFactory (<tt class="literal">NHibernate.ISessionFactory</tt>)</span></dt><dd><p>
2728
A threadsafe (immutable) cache of compiled mappings for a single database.
@@ -51,11 +52,12 @@
5152
(Optional) A single-threaded, short-lived object used by the application to
5253
specify atomic units of work. Abstracts application from underlying ADO.NET
5354
transaction. An <tt class="literal">ISession</tt> might span several
54-
<tt class="literal">ITransaction</tt>s in some cases.
55+
<tt class="literal">ITransaction</tt>s in some cases. Transaction scopes may be used
56+
instead.
5557
</p></dd><dt><span class="term">IConnectionProvider (<tt class="literal">NHibernate.Connection.IConnectionProvider</tt>)</span></dt><dd><p>
5658
(Optional) A factory for ADO.NET connections and commands. Abstracts application
57-
from the concrete vendor-specific implementations of <tt class="literal">IDbConnection</tt>
58-
and <tt class="literal">IDbCommand</tt>. Not exposed to application, but can be
59+
from the concrete vendor-specific implementations of <tt class="literal">DbConnection</tt>
60+
and <tt class="literal">DbCommand</tt>. Not exposed to application, but can be
5961
extended/implemented by the developer.
6062
</p></dd><dt><span class="term">IDriver (<tt class="literal">NHibernate.Driver.IDriver</tt>)</span></dt><dd><p>
6163
(Optional) An interface encapsulating differences between ADO.NET providers, such
@@ -88,7 +90,7 @@
8890
The instance was once associated with a persistence
8991
context, but that context was closed, or the instance
9092
was serialized to another process. It has a persistent
91-
identity and, perhaps, a corrsponding row in the database.
93+
identity and, perhaps, a corresponding row in the database.
9294
For detached instances, NHibernate makes no guarantees
9395
about the relationship between persistent identity and
9496
CLR identity.
@@ -101,7 +103,7 @@
101103
Starting with version 1.2, NHibernate added the <tt class="literal">ISessionFactory.GetCurrentSession()</tt>
102104
method. The processing behind <tt class="literal">ISessionFactory.GetCurrentSession()</tt> is pluggable.
103105
An extension interface (<tt class="literal">NHibernate.Context.ICurrentSessionContext</tt>) and a new
104-
configuration parameter (<tt class="literal">hibernate.current_session_context_class</tt>) have been added
106+
configuration parameter (<tt class="literal">current_session_context_class</tt>) have been added
105107
to allow pluggability of the scope and context of defining current sessions.
106108
</p><p>
107109
See the API documentation for the <tt class="literal">NHibernate.Context.ICurrentSessionContext</tt>
@@ -110,36 +112,44 @@
110112
tracking the current contextual session. Out-of-the-box, NHibernate comes with several
111113
implementations of this interface:
112114
</p><div class="itemizedlist"><ul type="disc"><li><p>
115+
<tt class="literal">NHibernate.Context.AsyncLocalSessionContext</tt> - current sessions are tracked
116+
by current asynchronous flow. You are responsible to bind and unbind an
117+
<tt class="literal">ISession</tt> instance with static methods of class
118+
<tt class="literal">CurrentSessionContext</tt>. Binding operations from inner flows will not be
119+
propagated to outer or siblings flows. Added in NHibernate 5.0.
120+
</p></li><li><p>
113121
<tt class="literal">NHibernate.Context.CallSessionContext</tt> - current sessions are tracked
114-
by <tt class="literal">CallContext</tt>. You are responsible to bind and unbind an <tt class="literal">
115-
ISession</tt> instance with static methods of class <tt class="literal">CurrentSessionContext
116-
</tt>.
122+
by <tt class="literal">CallContext</tt>. You are responsible to bind and unbind an
123+
<tt class="literal">ISession</tt> instance with static methods of class
124+
<tt class="literal">CurrentSessionContext</tt>.
117125
</p></li><li><p>
118126
<tt class="literal">NHibernate.Context.ThreadStaticSessionContext</tt> - current session is
119-
stored in a thread-static variable. This context only supports one session factory.
127+
stored in a thread-static variable. This context supports multiple session factory only
128+
since NHibernate v5.
120129
You are responsible to bind and unbind an <tt class="literal">ISession</tt> instance with
121130
static methods of class <tt class="literal">CurrentSessionContext</tt>.
122131
</p></li><li><p>
123-
<tt class="literal">NHibernate.Context.WebSessionContext</tt> -
124-
stores the current session in <tt class="literal">HttpContext</tt>.
125-
You are responsible to bind and unbind an <tt class="literal">ISession</tt>
126-
instance with static methods of class <tt class="literal">CurrentSessionContext</tt>.
132+
<tt class="literal">NHibernate.Context.WebSessionContext</tt> -
133+
stores the current session in <tt class="literal">HttpContext</tt>.
134+
You are responsible to bind and unbind an <tt class="literal">ISession</tt>
135+
instance with static methods of class <tt class="literal">CurrentSessionContext</tt>.
127136
</p></li><li><p>
128137
<tt class="literal">NHibernate.Context.WcfOperationSessionContext</tt> - current sessions are tracked
129138
by WCF <tt class="literal">OperationContext</tt>. You need to register the <tt class="literal">WcfStateExtension</tt>
130-
extension in WCF. You are responsible to bind and unbind an <tt class="literal">ISession
131-
</tt> instance with static methods of class <tt class="literal">CurrentSessionContext</tt>.
139+
extension in WCF. You are responsible to bind and unbind an <tt class="literal">ISession</tt>
140+
instance with static methods of class <tt class="literal">CurrentSessionContext</tt>.
132141
</p></li><li><p>
133142
<tt class="literal">NHibernate.Context.ManagedWebSessionContext</tt> - current
134-
sessions are tracked by <tt class="literal">HttpContext</tt>. Removed in NHibernate 4.0
135-
- <tt class="literal">NHibernate.Context.WebSessionContext</tt> should be used instead.
136-
You are responsible to bind and unbind an <tt class="literal">ISession</tt> instance with static methods
143+
sessions are tracked by <tt class="literal">HttpContext</tt>. Removed in NHibernate 4.0
144+
- <tt class="literal">NHibernate.Context.WebSessionContext</tt> should be used instead.
145+
You are responsible to bind and unbind an <tt class="literal">ISession</tt> instance with static methods
137146
on this class, it never opens, flushes, or closes an <tt class="literal">ISession</tt> itself.
138147
</p></li></ul></div><p>
139-
The <tt class="literal">hibernate.current_session_context_class</tt> configuration parameter
148+
The <tt class="literal">current_session_context_class</tt> configuration parameter
140149
defines which <tt class="literal">NHibernate.Context.ICurrentSessionContext</tt> implementation
141150
should be used. Typically, the value of this parameter would just name the implementation
142151
class to use (including the assembly name); for the out-of-the-box implementations, however,
143-
there are corresponding short names: "call", "thread_static", "web" and "wcf_operation",
152+
there are corresponding short names: <tt class="literal">async_local</tt>, <tt class="literal">call</tt>,
153+
<tt class="literal">thread_static</tt>, <tt class="literal">web</tt> and <tt class="literal">wcf_operation</tt>,
144154
respectively.
145-
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="quickstart.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="session-configuration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;1.&nbsp;Quickstart with IIS and Microsoft SQL Server&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;3.&nbsp;ISessionFactory Configuration</td></tr></table></div>{% include google_analytics.html %}{% include metrika_yandex_ru.html %}</body></html>
155+
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="quickstart.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="session-configuration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;1.&nbsp;Quick-start with IIS and Microsoft SQL Server&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;3.&nbsp;ISessionFactory Configuration</td></tr></table></div>{% include google_analytics.html %}{% include metrika_yandex_ru.html %}</body></html>

0 commit comments

Comments
 (0)