Share via


IDbContextTransaction.RollbackAsync(CancellationToken) Method

Definition

Discards all changes made to the database in the current transaction asynchronously.

public System.Threading.Tasks.Task RollbackAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member RollbackAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RollbackAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A Task representing the asynchronous operation.

Exceptions

Remarks

See Transactions in EF Core for more information and examples.

Applies to