Method BulkWrite
BulkWrite(IEnumerable<WriteModel<TDocument>>, BulkWriteOptions, CancellationToken)
Performs multiple write operations.
BulkWriteResult<TDocument> BulkWrite(IEnumerable<WriteModel<TDocument>> requests, BulkWriteOptions options = null, CancellationToken cancellationToken = default)
Parameters
requests
IEnumerable<WriteModel<TDocument>>The requests.
options
BulkWriteOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- BulkWriteResult<TDocument>
The result of writing.
BulkWrite(IClientSessionHandle, IEnumerable<WriteModel<TDocument>>, BulkWriteOptions, CancellationToken)
Performs multiple write operations.
BulkWriteResult<TDocument> BulkWrite(IClientSessionHandle session, IEnumerable<WriteModel<TDocument>> requests, BulkWriteOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
requests
IEnumerable<WriteModel<TDocument>>The requests.
options
BulkWriteOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- BulkWriteResult<TDocument>
The result of writing.