Skip to main content
.NET 6.0+

ExplicitUnitOfWork.RollbackTransaction() Method

Rolls back a database level transaction to its starting point, discarding any changes made within it.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.2.dll

NuGet Package: DevExpress.Xpo

Declaration

public override void RollbackTransaction()

Remarks

All data modifications made since the ExplicitUnitOfWork.BeginTransaction method call can be committed (ExplicitUnitOfWork.CommitTransaction, ExplicitUnitOfWork.CommitTransactionAsync, UnitOfWork.CommitChanges, or UnitOfWork.CommitChangesAsync), or discarded (RollbackTransaction). Disposing of an explicit unit of work automatically rolls back any pending data modifications.

Calling the RollbackTransaction method performs the following:

Note

An object’s state modified within a transaction is not automatically returned to its former state by the RollbackTransaction method call. In order to refresh the object’s state, use the XPBaseObject.Reload method.

See Also