MongoCollectionBase<TDocument>.InsertManyAsync Method (IClientSessionHandle, IEnumerable<TDocument>, InsertManyOptions, CancellationToken) |
Inserts many documents.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax public virtual Task InsertManyAsync(
IClientSessionHandle session,
IEnumerable<TDocument> documents,
InsertManyOptions options = null,
CancellationToken cancellationToken = null
)
Public Overridable Function InsertManyAsync (
session As IClientSessionHandle,
documents As IEnumerable(Of TDocument),
Optional options As InsertManyOptions = Nothing,
Optional cancellationToken As CancellationToken = Nothing
) As Task
abstract InsertManyAsync :
session : IClientSessionHandle *
documents : IEnumerable<'TDocument> *
?options : InsertManyOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _options = defaultArg options null
let _cancellationToken = defaultArg cancellationToken null
*)
-> Task
override InsertManyAsync :
session : IClientSessionHandle *
documents : IEnumerable<'TDocument> *
?options : InsertManyOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _options = defaultArg options null
let _cancellationToken = defaultArg cancellationToken null
*)
-> Task
Parameters
- session
- Type: MongoDB.Driver.IClientSessionHandle
The session. - documents
- Type: System.Collections.Generic.IEnumerable<TDocument>
The documents. - options (Optional)
- Type: MongoDB.Driver.InsertManyOptions
The options. - cancellationToken (Optional)
- Type: System.Threading.CancellationToken
The cancellation token.
Return Value
Type:
Task
The result of the insert operation.
Implements
IMongoCollection<TDocument>.InsertManyAsync(IClientSessionHandle, IEnumerable<TDocument>, InsertManyOptions, CancellationToken)See Also