Enlist the IDbCommand in the current ITransaction.

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

Syntax

C#
public void Enlist(
	IDbCommand command
)
Visual Basic
Public Sub Enlist ( _
	command As IDbCommand _
)
Visual C++
public:
virtual void Enlist(
	IDbCommand^ command
) sealed

Parameters

command
Type: System.Data..::..IDbCommand
The IDbCommand to enlist in this Transaction.

Implements

ITransaction..::..Enlist(IDbCommand)

Remarks

This takes care of making sure the IDbCommand's Transaction property contains the correct IDbTransaction or nullNothingnullptra null reference (Nothing in Visual Basic) if there is no Transaction for the ISession - ie BeginTransaction() not called.

This method may be called even when the transaction is disposed.

See Also