End the ISession by disconnecting from the ADO.NET connection and cleaning up.

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

Syntax

C#
IDbConnection Close()
Visual Basic
Function Close As IDbConnection
Visual C++
IDbConnection^ Close()

Return Value

The connection provided by the application or nullNothingnullptra null reference (Nothing in Visual Basic)

Remarks

It is not strictly necessary to Close() the ISession but you must at least Disconnect() it.

See Also