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+

Session.ExplicitBeginTransaction() Method

Marks the starting point of an explicit transaction.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public void ExplicitBeginTransaction()
Public Sub ExplicitBeginTransaction
public void ExplicitBeginTransaction()
Public Sub ExplicitBeginTransaction

Remarks

The ExplicitBeginTransaction method represents the point at which the data referenced by a session is consistent. All data modifications made after calling the ExplicitBeginTransaction method can be rolled back. This allows data to be returned to this known state of consistency.

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

Note

In a session, you need to use the ExplicitBeginTransaction method, in combination with the Session.BeginTrackingChanges method, that allows for tracking changes made to persistent objects within the opened explicit transaction. Units of work provide this capability out of the box, so to simplify tracking changes you may consider using them. In addition, you can simplify the management of explicit transactions, by means of explicit units of work.

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

See Also