DbTransaction.CommitAsync(CancellationToken) DbTransaction.CommitAsync(CancellationToken) Method

Definition

Asynchronously commits the database transaction.

public virtual System.Threading.Tasks.Task CommitAsync (System.Threading.CancellationToken cancellationToken = null);
abstract member CommitAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.CommitAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

cancellationToken
CancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

A Task representing the asynchronous operation.

Remarks

The default implementation of this asynchronous method delegates to its synchronous counterpart and returns a completed Task, potentially blocking the calling thread.

Data providers that support asynchronous programming should override the default implementation using asynchronous I/O operations.

Applies to