Method InsertOne
InsertOne(TDocument, InsertOneOptions, CancellationToken)
Inserts a single document.
public virtual void InsertOne(TDocument document, InsertOneOptions options = null, CancellationToken cancellationToken = default)
Parameters
document
TDocumentThe document.
options
InsertOne Options The options.
cancellationToken
CancellationToken The cancellation token.
InsertOne(IClientSessionHandle, TDocument, InsertOneOptions, CancellationToken)
Inserts a single document.
public virtual void InsertOne(IClientSessionHandle session, TDocument document, InsertOneOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSession Handle The session.
document
TDocumentThe document.
options
InsertOne Options The options.
cancellationToken
CancellationToken The cancellation token.