Table of Contents

Method RollbackAsync

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

RollbackAsync(CancellationToken)

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

public Task RollbackAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

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

Returns

Task

A Task representing the asynchronous operation.

Remarks

See Transactions in EF Core for more information and examples.

Exceptions

OperationCanceledException

If the CancellationToken is canceled.