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 = default);
abstract member RollbackAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.RollbackAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function RollbackAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

cancellationToken
CancellationToken

An optional token to cancel the asynchronous operation. The default value is None.

Returns

Task

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