Allows the application to define units of work, while maintaining abstraction from the underlying transaction implementation

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

Syntax

Visual Basic (Declaration)
Public Interface ITransaction _
	Implements IDisposable
C#
public interface ITransaction : IDisposable
Visual C++
public interface class ITransaction : IDisposable
JavaScript
NHibernate.ITransaction = function();
NHibernate.ITransaction.createInterface('NHibernate.ITransaction');

Remarks

A transaction is associated with a ISession and is usually instanciated by a call to ISession.BeginTransaction(). A single session might span multiple transactions since the notion of a session (a conversation between the application and the datastore) is of coarser granularity than the notion of a transaction. However, it is intended that there be at most one uncommitted ITransaction associated with a particular ISession at a time. Implementors are not intended to be threadsafe.

See Also