Method InsertMany

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

InsertMany(IEnumerable, InsertManyOptions, CancellationToken)

Inserts many documents.

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

Parameters

documents IEnumerable

The documents.

options InsertManyOptions

The options.

cancellationToken CancellationToken

The cancellation token.

InsertMany(IClientSessionHandle, IEnumerable, InsertManyOptions, CancellationToken)

Inserts many documents.

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

Parameters

session IClientSessionHandle

The session.

documents IEnumerable

The documents.

options InsertManyOptions

The options.

cancellationToken CancellationToken

The cancellation token.