Back to Devexpress

Session.ExplicitCommitTransactionAsync(CancellationToken) Method

xpo-devexpress-dot-xpo-dot-session-dot-explicitcommittransactionasync-x28-system-dot-threading-dot-cancellationtoken-x29.md

latest2.3 KB
Original Source

Session.ExplicitCommitTransactionAsync(CancellationToken) Method

Asynchronously completes a database level transaction and commits changes made within the transaction.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public Task ExplicitCommitTransactionAsync(
    CancellationToken cancellationToken = default(CancellationToken)
)
vb
Public Function ExplicitCommitTransactionAsync(
    cancellationToken As CancellationToken = Nothing
) As Task

Optional Parameters

NameTypeDefaultDescription
cancellationTokenCancellationTokennull

A CancellationToken object that delivers a cancellation notice to the running operation.

|

Returns

TypeDescription
Task

A Task that commits changes made within a database level transaction and completes the transaction.

|

Remarks

To start a database level transaction, use the Session.ExplicitBeginTransaction method. To complete the database level transaction asynchronously, call the ExplicitCommitTransactionAsync method. All data modifications made since the start of the transaction can be discarded via the Session.ExplicitRollbackTransaction method call.

See Also

Session Class

Session Members

DevExpress.Xpo Namespace