Starts a new Session with the given entity mode in effect. This secondary Session inherits the connection, transaction, and other context information from the primary Session. It doesn't need to be flushed or closed by the developer.

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

Syntax

C#
ISession GetSession(
	EntityMode entityMode
)
Visual Basic
Function GetSession ( _
	entityMode As EntityMode _
) As ISession
Visual C++
ISession^ GetSession(
	EntityMode entityMode
)

Parameters

entityMode
Type: NHibernate..::..EntityMode
The entity mode to use for the new session.

Return Value

The new session

See Also