Table of Contents

Method CommitAsync

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

CommitAsync(CancellationToken)

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

public Task CommitAsync(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.