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

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

Syntax

C#
ISession CurrentSession()
Visual Basic
Function CurrentSession As ISession
Visual C++
ISession^ CurrentSession()

Return Value

The current session.

Exceptions

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

See Also