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#
public virtual ISession CurrentSession()
Visual Basic
Public Overridable Function CurrentSession As ISession
Visual C++
public:
virtual ISession^ CurrentSession()

Return Value

The current session.

Implements

ICurrentSessionContext..::..CurrentSession()()()()

Exceptions

ExceptionCondition
NHibernate..::..HibernateExceptionIndicates an issue locating the current session.

See Also