Retrieve the current session according to the scoping defined by this implementation.

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

Syntax

Visual Basic (Declaration)
Function CurrentSession As ISession
C#
ISession CurrentSession()
Visual C++
ISession^ CurrentSession()
JavaScript
function currentSession();

Return Value

The current session.

Exceptions

ExceptionCondition
NHibernate..::.HibernateExceptionTypically indicates an issue locating or creating the current session.

See Also