Click or drag to resize
MongoCollectionBaseTDocument Class
Inheritance Hierarchy
SystemObject
  MongoDB.DriverMongoCollectionBaseTDocument

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.1.0
Syntax
public abstract class MongoCollectionBase<TDocument> : IMongoCollection<TDocument>

Type Parameters

TDocument
The type of the document.

The MongoCollectionBaseTDocument type exposes the following members.

Constructors
  NameDescription
Protected methodMongoCollectionBaseTDocument
Initializes a new instance of the MongoCollectionBaseTDocument class
Top
Methods
  NameDescription
Public methodAggregateAsyncTResult
Runs an aggregation pipeline.
Public methodBulkWriteAsync
Performs multiple write operations.
Public methodCountAsync
Counts the number of documents in the collection.
Public methodDeleteManyAsync
Deletes multiple documents.
Public methodDeleteOneAsync
Deletes a single document.
Public methodDistinctAsyncTField
Gets the distinct values for a specified field.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindAsyncTProjection
Finds the documents matching the filter.
Public methodFindOneAndDeleteAsyncTProjection
Finds a single document and deletes it atomically.
Public methodFindOneAndReplaceAsyncTProjection
Finds a single document and replaces it atomically.
Public methodFindOneAndUpdateAsyncTProjection
Finds a single document and updates it atomically.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsertManyAsync
Inserts many documents.
Public methodInsertOneAsync
Inserts a single document.
Public methodMapReduceAsyncTResult
Executes a map-reduce command.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOfTypeTDerivedDocument
Returns a filtered collection that appears to contain only documents of the derived type. All operations using this filtered collection will automatically use discriminators as necessary.
Public methodReplaceOneAsync
Replaces a single document.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateManyAsync
Updates many documents.
Public methodUpdateOneAsync
Updates a single document.
Public methodWithReadPreference
Returns a new collection with a different read preference.
Public methodWithWriteConcern
Returns a new collection with a different write concern.
Top
Extension Methods
  NameDescription
Public Extension MethodAggregateTDocument
Begins a fluent aggregation interface.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodAsQueryableTDocument
Creates a queryable source of documents.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodCountAsyncTDocument
Counts the number of documents in the collection.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodDeleteManyAsyncTDocument
Deletes multiple documents.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodDeleteOneAsyncTDocument
Deletes a single document.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodDistinctAsyncTDocument, TField(ExpressionFuncTDocument, TField, FilterDefinitionTDocument, DistinctOptions, CancellationToken)Overloaded.
Gets the distinct values for a specified field.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodDistinctAsyncTDocument, TField(ExpressionFuncTDocument, TField, ExpressionFuncTDocument, Boolean, DistinctOptions, CancellationToken)Overloaded.
Gets the distinct values for a specified field.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodDistinctAsyncTDocument, TField(FieldDefinitionTDocument, TField, ExpressionFuncTDocument, Boolean, DistinctOptions, CancellationToken)Overloaded.
Gets the distinct values for a specified field.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindTDocument(ExpressionFuncTDocument, Boolean, FindOptions)Overloaded.
Begins a fluent find interface.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindTDocument(FilterDefinitionTDocument, FindOptions)Overloaded.
Begins a fluent find interface.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindAsyncTDocument(ExpressionFuncTDocument, Boolean, FindOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds the documents matching the filter.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindAsyncTDocument(FilterDefinitionTDocument, FindOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds the documents matching the filter.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndDeleteAsyncTDocument(ExpressionFuncTDocument, Boolean, FindOneAndDeleteOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and deletes it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndDeleteAsyncTDocument(FilterDefinitionTDocument, FindOneAndDeleteOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and deletes it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndDeleteAsyncTDocument, TProjection(ExpressionFuncTDocument, Boolean, FindOneAndDeleteOptionsTDocument, TProjection, CancellationToken)Overloaded.
Finds a single document and deletes it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndReplaceAsyncTDocument(ExpressionFuncTDocument, Boolean, TDocument, FindOneAndReplaceOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and replaces it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndReplaceAsyncTDocument(FilterDefinitionTDocument, TDocument, FindOneAndReplaceOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and replaces it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndReplaceAsyncTDocument, TProjection(ExpressionFuncTDocument, Boolean, TDocument, FindOneAndReplaceOptionsTDocument, TProjection, CancellationToken)Overloaded.
Finds a single document and replaces it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndUpdateAsyncTDocument(ExpressionFuncTDocument, Boolean, UpdateDefinitionTDocument, FindOneAndUpdateOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and updates it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndUpdateAsyncTDocument(FilterDefinitionTDocument, UpdateDefinitionTDocument, FindOneAndUpdateOptionsTDocument, TDocument, CancellationToken)Overloaded.
Finds a single document and updates it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodFindOneAndUpdateAsyncTDocument, TProjection(ExpressionFuncTDocument, Boolean, UpdateDefinitionTDocument, FindOneAndUpdateOptionsTDocument, TProjection, CancellationToken)Overloaded.
Finds a single document and updates it atomically.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodReplaceOneAsyncTDocument
Replaces a single document.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodUpdateManyAsyncTDocument
Updates many documents.
(Defined by IMongoCollectionExtensions.)
Public Extension MethodUpdateOneAsyncTDocument
Updates a single document.
(Defined by IMongoCollectionExtensions.)
Top
Properties
  NameDescription
Public propertyCollectionNamespace
Gets the namespace of the collection.
Public propertyDatabase
Gets the database.
Public propertyDocumentSerializer
Gets the document serializer.
Public propertyIndexes
Gets the index manager.
Public propertySettings
Gets the settings.
Top
See Also