Table of Contents

Method InsertMany

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

InsertMany(IEnumerable<TDocument>, InsertManyOptions, CancellationToken)

Inserts many documents.

public virtual void InsertMany(IEnumerable<TDocument> documents, InsertManyOptions options = null, CancellationToken cancellationToken = default)

Parameters

documents IEnumerable<TDocument>

The documents.

options InsertManyOptions

The options.

cancellationToken CancellationToken

The cancellation token.

InsertMany(IClientSessionHandle, IEnumerable<TDocument>, InsertManyOptions, CancellationToken)

Inserts many documents.

public virtual void InsertMany(IClientSessionHandle session, IEnumerable<TDocument> documents, InsertManyOptions options = null, CancellationToken cancellationToken = default)

Parameters

session IClientSessionHandle

The session.

documents IEnumerable<TDocument>

The documents.

options InsertManyOptions

The options.

cancellationToken CancellationToken

The cancellation token.