Method BulkWriteAsync
BulkWriteAsync(IEnumerable<WriteModel<TDocument>>, BulkWriteOptions, CancellationToken)
Performs multiple write operations.
Task<BulkWriteResult<TDocument>> BulkWriteAsync(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
- Task<BulkWriteResult<TDocument>>
The result of writing.
BulkWriteAsync(IClientSessionHandle, IEnumerable<WriteModel<TDocument>>, BulkWriteOptions, CancellationToken)
Performs multiple write operations.
Task<BulkWriteResult<TDocument>> BulkWriteAsync(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
- Task<BulkWriteResult<TDocument>>
The result of writing.