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.CommitTransactionAsync(AsyncCommitCallback) Method

Asynchronously commits changes made within a transaction, completes it and notifies upon completion.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public virtual object CommitTransactionAsync(
    AsyncCommitCallback callback
)
Public Overridable Function CommitTransactionAsync(
    callback As AsyncCommitCallback
) As Object
public virtual object CommitTransactionAsync(
    AsyncCommitCallback callback
)
Public Overridable Function CommitTransactionAsync(
    callback As AsyncCommitCallback
) As Object

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.

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.

Returns

Type Description
Object

An object identifying the current asynchronous operation, intended for internal use.

Remarks

To start a transaction, use the Session.BeginTransaction method. To commit all data modifications made since the start of the transaction and complete the transaction, call the CommitTransactionAsync or Session.CommitTransaction method. To discard these modifications, call the Session.RollbackTransaction method.

To determine if a transaction is in progress, use the Session.InTransaction property.

After the CommitTransactionAsync method is called, the Session.BeforeCommitTransaction event is raised.

Note

In a Nested Units of Work, calling the CommitTransactionAsync method throws the System.NotSupportedException since changes within these Units should be saved using only the main thread.

See Also