Retrieve the current session according to the scoping defined
by this implementation.
Namespace:
NHibernate.ContextAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Overridable Function CurrentSession As ISession |
C# |
---|
public virtual ISession CurrentSession() |
Visual C++ |
---|
public: virtual ISession^ CurrentSession() |
JavaScript |
---|
function currentSession(); |
Return Value
The current session.Implements
ICurrentSessionContext..::.CurrentSession()()()
Exceptions
Exception | Condition |
---|---|
NHibernate..::.HibernateException | Indicates an issue locating the current session. |