Provides a current session for each thread using the [ThreadStaticAttribute]. To avoid if there are two session factories in the same thread.

Namespace:  NHibernate.Context
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public Class ThreadStaticSessionContext _
	Inherits CurrentSessionContext
C#
[SerializableAttribute]
public class ThreadStaticSessionContext : CurrentSessionContext
Visual C++
[SerializableAttribute]
public ref class ThreadStaticSessionContext : public CurrentSessionContext
JavaScript
NHibernate.Context.ThreadStaticSessionContext = function();

Type.createClass(
	'NHibernate.Context.ThreadStaticSessionContext',
	NHibernate.Context.CurrentSessionContext);

Inheritance Hierarchy

System..::.Object
  NHibernate.Context..::.CurrentSessionContext
    NHibernate.Context..::.ThreadStaticSessionContext

See Also