DbTransaction.RollbackAsync(CancellationToken) DbTransaction.RollbackAsync(CancellationToken) Method

Definition

Asynchronously rolls back a transaction from a pending state.

public virtual System.Threading.Tasks.Task RollbackAsync (System.Threading.CancellationToken cancellationToken = null);
abstract member RollbackAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.RollbackAsync : 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