Table of Contents

Method SaveChangesAsync

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

SaveChangesAsync(IList<IUpdateEntry>, CancellationToken)

Save all the changes detected in the entities collection to the underlying MongoDB database asynchronously.

public override Task<int> SaveChangesAsync(IList<IUpdateEntry> entries, CancellationToken cancellationToken = default)

Parameters

entries IList<IUpdateEntry>

A list of IUpdateEntry indicating which changes to process.

cancellationToken CancellationToken

A CancellationToken that might be cancelled during the save.

Returns

Task<int>

Task that when resolved contains the number of documents affected during saving changes.