The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ExplicitUnitOfWork.BeginTransaction() Method

Marks the starting point of an explicit transaction.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public override void BeginTransaction()
Public Overrides Sub BeginTransaction
public override void BeginTransaction()
Public Overrides Sub BeginTransaction

Remarks

The BeginTransaction method represents the point at which the data referenced by an explicit unit of work is consistent. All data modifications made after calling the BeginTransaction method can be rolled back. This allows data to be returned to this known state of consistency.

An explicit unit of work automatically calls the BeginTransaction method when a persistent object is about to be loaded from a database for the first time. You can manually call this method whenever you see it fit.

Once started, an explicit transaction lasts until one of the following occurs:

Calling the BeginTransaction method raises the Session.BeforeBeginTransaction event. Once an explicit transaction is started, the Session.AfterBeginTransaction event is raised.

Note

The BeginTransaction method throws an exception if an explicit transaction has already been started.

See Also