/// <inheritdoc /> public virtual void InsertOne(IClientSessionHandle session, TDocument document, InsertOneOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { InsertOne(document, options, (requests, bulkWriteOptions) => BulkWrite(session, requests, bulkWriteOptions, cancellationToken)); }
/// <inheritdoc /> public virtual Task InsertOneAsync(IClientSessionHandle session, TDocument document, InsertOneOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { return(InsertOneAsync(document, options, (requests, bulkWriteOptions) => BulkWriteAsync(session, requests, bulkWriteOptions, cancellationToken))); }
public static void Insert <TDocument>(this IMongoCollection <TDocument> collection, TDocument doc, InsertOneOptions insertOpts = null) { collection.InsertOne(doc, insertOpts); }