Method Insert
Insert<TNominalType>(TNominalType)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
Parameters
document
TNominalType The document to insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).
Type Parameters
TNominalType
The nominal type of the document to insert.
Insert<TNominalType>(TNominalType, MongoInsertOptions)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
public virtual WriteConcernResult Insert<TNominalType>(TNominalType document, MongoInsertOptions options)
Parameters
document
TNominalType The document to insert.
options
MongoInsert Options The options to use for this Insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).
Type Parameters
TNominalType
The nominal type of the document to insert.
Insert<TNominalType>(TNominalType, WriteConcern)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
public virtual WriteConcernResult Insert<TNominalType>(TNominalType document, WriteConcern writeConcern)
Parameters
document
TNominalType The document to insert.
writeConcern
WriteConcern The write concern to use for this Insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).
Type Parameters
TNominalType
The nominal type of the document to insert.
Insert(Type, object)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
Parameters
nominalType
TypeThe nominal type of the document to insert.
document
objectThe document to insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).
Insert(Type, object, MongoInsertOptions)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
public virtual WriteConcernResult Insert(Type nominalType, object document, MongoInsertOptions options)
Parameters
nominalType
TypeThe nominal type of the document to insert.
document
objectThe document to insert.
options
MongoInsert Options The options to use for this Insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).
Insert(Type, object, WriteConcern)
Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
public virtual WriteConcernResult Insert(Type nominalType, object document, WriteConcern writeConcern)
Parameters
nominalType
TypeThe nominal type of the document to insert.
document
objectThe document to insert.
writeConcern
WriteConcern The write concern to use for this Insert.
Returns
- Write
Concern Result A WriteConcernResult (or null if WriteConcern is disabled).