ExplicitUnitOfWork.CommitTransactionAsync(AsyncCommitCallback) Method
Asynchronously completes a database level transaction and notifies upon completion.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
callback | AsyncCommitCallback | An AsyncCommitCallback delegate to be called after the changes have been saved to a data store. Use a callback to store the exception information passed as a parameter, and use this information later to raise the exception again, within the original thread. Do not raise exceptions or modify persistent objects within a callback. |
Returns
Type | Description |
---|---|
Object | An object identifying the current asynchronous operation, intended for internal use. |
Remarks
All data modifications made since the ExplicitUnitOfWork.BeginTransaction method call can be committed (ExplicitUnitOfWork.CommitTransaction, CommitTransactionAsync, UnitOfWork.CommitChanges, or UnitOfWork.CommitChangesAsync) or discarded (ExplicitUnitOfWork.RollbackTransaction).
Calling the CommitTransactionAsync method performs the following:
- Asynchronously flushes all data modifications via the Session.FlushChangesAsync method call.
- Raises the Session.BeforeCommitTransaction event. Once an explicit transaction is committed, the Session.AfterCommitTransaction event is raised.