Table of Contents

Method BulkWrite

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

BulkWrite(IReadOnlyList<BulkWriteModel>, ClientBulkWriteOptions, CancellationToken)

Executes a list of mixed write operations.

ClientBulkWriteResult BulkWrite(IReadOnlyList<BulkWriteModel> models, ClientBulkWriteOptions options = null, CancellationToken cancellationToken = default)

Parameters

models IReadOnlyList<BulkWriteModel>

List of operations to execute.

options ClientBulkWriteOptions

The bulk write options.

cancellationToken CancellationToken

The cancellation token.

Returns

ClientBulkWriteResult

BulkWrite(IClientSessionHandle, IReadOnlyList<BulkWriteModel>, ClientBulkWriteOptions, CancellationToken)

Executes a list of mixed write operations.

ClientBulkWriteResult BulkWrite(IClientSessionHandle session, IReadOnlyList<BulkWriteModel> models, ClientBulkWriteOptions options = null, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

models IReadOnlyList<BulkWriteModel>

List of operations to execute.

options ClientBulkWriteOptions

The bulk write options.

cancellationToken CancellationToken

The cancellation token.

Returns

ClientBulkWriteResult