Click or drag to resize
MongoDB.Driver Namespace
The MongoDB.Driver namespace contains all the basic types and classes that compose the MongoDB driver. It contains the classes needed for most interactions with the database.
Classes
  ClassDescription
Public classAggregateArgs
Represents options for the Aggregate command.
Public classAggregateFluentBaseTResult
Public classAggregateLookupOptionsTForeignDocument, TResult
Options for the aggregate $lookup stage.
Public classAggregateOptions
Options for an aggregate operation.
Public classAggregateUnwindOptionsTResult
Options for the $unwind aggregation stage.
Public classBatchTransformingAsyncCursorTFromDocument, TToDocument
Represents a cursor that wraps another cursor with a transformation function on the documents.
Public classBsonDocumentCommandTResult
A BsonDocument based command.
Public classBsonDocumentFilterDefinitionTDocument
A BsonDocument based filter.
Public classBsonDocumentIndexKeysDefinitionTDocument
A BsonDocument based index keys definition.
Public classBsonDocumentPipelineStageDefinitionTInput, TOutput
A BsonDocument based stage.
Public classBsonDocumentProjectionDefinitionTSource
A BsonDocument based projection whose projection type is not yet known.
Public classBsonDocumentProjectionDefinitionTSource, TProjection
A BsonDocument based projection.
Public classBsonDocumentSortDefinitionTDocument
A BsonDocument based sort.
Public classBsonDocumentStagePipelineDefinitionTInput, TOutput
A pipeline composed of instances of BsonDocument.
Public classBsonDocumentUpdateDefinitionTDocument
A BsonDocument based update.
Public classBuildersTDocument
A static helper class containing various builders.
Public classBulkUpdateRequestBuilderTDocument
Represents a fluent builder for one update request.
Public classBulkWriteError
Represents the details of a write error for a particular request.
Public classBulkWriteOperationTDocument
Represents a fluent builder for a bulk operation.
Public classBulkWriteOptions
Options for a bulk write operation.
Public classBulkWriteRequestBuilderTDocument
Represents a fluent builder for a write request (either a remove or an update).
Public classBulkWriteResult
Represents the result of a bulk write operation.
Public classBulkWriteResultTDocument
Represents the result of a bulk write operation.
Public classBulkWriteResultTDocumentAcknowledged
Result from an acknowledged write concern.
Public classBulkWriteResultTDocumentUnacknowledged
Result from an unacknowledged write concern.
Public classBulkWriteUpsert
Represents the information about one Upsert.
Public classClientSideDeserializationProjectionDefinitionTSource, TProjection
A client side only projection that is implemented solely by deserializing using a different serializer.
Public classCollectionNamespace
Represents a collection namespace.
Public classCollectionOptionsDocument
Represents a BSON document that can be used where an IMongoCollectionOptions is expected.
Public classCollectionStatsResult
Represents the results of the collection stats command.
Public classCollectionStatsResultIndexSizesResult
Represents a collection of index sizes.
Public classCombinedPipelineDefinitionTInput, TIntermediateOutput, TOutput
A pipeline defined by combining two pipeline definitions.
Public classCommandTResult
Base class for commands.
Public classCommandDocument
Represents a BSON document that can be used where an IMongoCommand is expected.
Public classCommandResult
Represents the result of a command (there are also subclasses for various commands).
Public classCommandResultSerializerTCommandResult
Represents a serializer for a CommandResult.
Public classCountArgs
Represents arguments for the Count command helper method.
Public classCountOptions
Options for a count operation.
Public classCreateCollectionOptions
Options for creating a collection.
Public classCreateCollectionOptionsTDocument
Options for creating a collection.
Public classCreateIndexModelTDocument
Model for creating an index.
Public classCreateIndexOptions
Options for creating an index.
Public classCreateIndexOptionsTDocument
Options for creating an index.
Public classDatabaseNamespace
Represents a database namespace.
Public classDatabaseStatsResult
Represents the result of the database stats command.
Public classDeferredAsyncCursorTDocument
Represents a cursor for an operation that is not actually executed until MoveNextAsync is called for the first time.
Public classDeleteManyModelTDocument
Model for deleting many documents.
Public classDeleteOneModelTDocument
Model for deleting a single document.
Public classDeleteResult
The result of a delete operation.
Public classDeleteResultAcknowledged
The result of an acknowledged delete operation.
Public classDeleteResultUnacknowledged
The result of an unacknowledged delete operation.
Public classDistinctArgs
Represents arguments for the Distinct command helper method.
Public classDistinctOptions
Options for the distinct command.
Public classEvalArgs
Represents arguments for the Eval command helper method.
Public classExpressionFieldDefinitionTDocument
An Expression based field.
Public classExpressionFieldDefinitionTDocument, TField
An Expression based field.
Public classExpressionFilterDefinitionTDocument
An Expression based filter.
Public classExternalEvidence
Evidence of a MongoIdentity via an external mechanism. For example, on windows this may be the current process' user or, on linux, via kinit.
Public classFieldDefinitionTDocument
Base class for field names.
Public classFieldDefinitionTDocument, TField
Base class for field names.
Public classFieldsDocument
Represents a BSON document that can be used where an IMongoFields is expected.
Public classFilterDefinitionTDocument
Base class for filters.
Public classFilterDefinitionBuilderTDocument
Public classFindAndModifyArgs
Represents options for the FindAndModify command.
Public classFindAndModifyResult
Represents the result of a FindAndModify command.
Public classFindAndRemoveArgs
Represents options for the FindAndRemove command.
Public classFindExpressionProjectionDefinitionTSource, TProjection
A find Expression based projection.
Public classFindFluentBaseTDocument, TProjection
Public classFindOneAndDeleteOptionsTDocument
Options for a findAndModify command to delete an object.
Public classFindOneAndDeleteOptionsTDocument, TProjection
Options for a findAndModify command to delete an object.
Public classFindOneAndReplaceOptionsTDocument
Options for a findAndModify command to replace an object.
Public classFindOneAndReplaceOptionsTDocument, TProjection
Options for a findAndModify command to replace an object.
Public classFindOneAndUpdateOptionsTDocument
Options for a findAndModify command to update an object.
Public classFindOneAndUpdateOptionsTDocument, TProjection
Options for a findAndModify command to update an object.
Public classFindOneArgs
Represents arguments to the FindOne method.
Public classFindOptions
Options for finding documents.
Public classFindOptionsTDocument
Options for finding documents.
Public classFindOptionsTDocument, TProjection
Options for finding documents.
Public classFindOptionsBase
Options for a find operation.
Public classGeoHaystackSearchArgs
Represents the arguments to the GeoHaystackSearch method.
Public classGeoHaystackSearchOptionsDocument Obsolete.
Represents a BSON document that can be used where an IMongoGeoHaystackSearchOptions is expected.
Public classGeoHaystackSearchResult
Represents the result of a GeoHaystackSearch command.
Public classGeoHaystackSearchResultGeoHaystackSearchHit
Represents a GeoHaystackSearch hit.
Public classGeoHaystackSearchResultGeoHaystackSearchHits
Represents a collection of GeoHaystackSearch hits.
Public classGeoHaystackSearchResultGeoHaystackSearchStats
Represents the stats of a GeoHaystackSearch command.
Public classGeoHaystackSearchResultTDocument
Represents the result of a GeoHaystackSearch command.
Public classGeoHaystackSearchResultTDocumentGeoHaystackSearchHit
Represents a GeoHaystackSearch hit.
Public classGeoHaystackSearchResultTDocumentGeoHaystackSearchHits
Represents a collection of GeoHaystackSearch hits.
Public classGeoNearArgs
Represents the arguments to the GeoNear method.
Public classGeoNearOptionsDocument Obsolete.
Represents a BSON document that can be used where an IMongoGeoNearOptions is expected.
Public classGeoNearPoint
Represents a GeoNearPoint (wraps either an XYPoint or a GeoJsonPoint).
Public classGeoNearPointGeoJsonTCoordinates
Represents a GeoNearPoint that wraps a GeoJsonPoint.
Public classGeoNearPointLegacy
Represents a GeoNearPoint that wraps an XYPoint.
Public classGeoNearResult
Represents the result of a GeoNear command.
Public classGeoNearResultGeoNearHit
Represents a GeoNear hit.
Public classGeoNearResultGeoNearHits
Represents a collection of GeoNear hits.
Public classGeoNearResultGeoNearStats
Represents the stats of a GeoNear command.
Public classGeoNearResultTDocument
Represents the result of a GeoNear command.
Public classGeoNearResultTDocumentGeoNearHit
Represents a GeoNear hit.
Public classGeoNearResultTDocumentGeoNearHits
Represents a collection of GeoNear hits.
Public classGetIndexesResult
Represents the result of GetIndexes.
Public classGetProfilingLevelResult
Represents the results of a GetProfilingLevel command.
Public classGetStatsArgs
Represents arguments for the GetStats command helper method.
Public classGroupArgs
Represents arguments for the Group command helper method.
Public classGroupByDocument
Represents a BSON document that can be used where an IMongoGroupBy is expected.
Public classIAggregateFluentExtensions
Public classIAsyncCursorExtensions
Represents extension methods for IAsyncCursor.
Public classIAsyncCursorSourceExtensions
Represents extension methods for IAsyncCursorSource.
Public classIFindFluentExtensions
Public classIMongoCollectionExtensions
Public classIndexInfo
Represents information about an index.
Public classIndexKeysDefinitionTDocument
Base class for an index keys definition.
Public classIndexKeysDefinitionBuilderTDocument
Public classIndexKeysDefinitionExtensions
Extension methods for an index keys definition.
Public classIndexKeysDocument
Represents a BSON document that can be used where an IMongoIndexKeys is expected.
Public classIndexOptionDefaults
Represents index option defaults.
Public classIndexOptionsDocument
Represents a BSON document that can be used where an IMongoIndexOptions is expected.
Public classInsertManyOptions
Options for inserting many documents.
Public classInsertOneModelTDocument
Model for inserting a single document.
Public classInsertOneOptions
Options for inserting one document.
Public classJsonCommandTResult
A JSON String based command.
Public classJsonFilterDefinitionTDocument
A JSON String based filter.
Public classJsonIndexKeysDefinitionTDocument
A JSON String based index keys definition.
Public classJsonPipelineStageDefinitionTInput, TOutput
A JSON String based pipeline stage.
Public classJsonProjectionDefinitionTSource
A JSON String based projection whose projection type is not yet known.
Public classJsonProjectionDefinitionTSource, TProjection
A JSON String based projection.
Public classJsonSortDefinitionTDocument
A JSON String based sort.
Public classJsonUpdateDefinitionTDocument
A JSON String based update.
Public classListCollectionsOptions
Options for a list collections operation.
Public classMapReduceArgs
Represents arguments for the MapReduce command helper method.
Public classMapReduceOptionsTDocument, TResult
Represents the options for a map-reduce operation.
Public classMapReduceOutputOptions
Represents the output options for a map-reduce operation.
Public classMapReduceResult
Represents the result of a map-reduce command.
Public classMongoAuthenticationException
Represents a MongoDB authentication exception.
Public classMongoBulkWriteException
Represents a bulk write exception.
Public classMongoBulkWriteExceptionTDocument
Represents a bulk write exception.
Public classMongoClient
Base class for implementors of IMongoClient.
Public classMongoClientBase
Base class for implementors of IMongoClient.
Public classMongoClientException
Represents a MongoDB client exception.
Public classMongoClientExtensions
Represents extension methods on MongoClient.
Public classMongoClientSettings
The settings for a MongoDB client.
Public classMongoCollection
Represents a MongoDB collection and the settings used to access it. This class is thread-safe.
Public classMongoCollectionTDefaultDocument
Represents a MongoDB collection and the settings used to access it as well as a default document type. This class is thread-safe.
Public classMongoCollectionBaseTDocument
Public classMongoCollectionSettings
The settings used to access a collection.
Public classMongoCommandException
Represents a MongoDB command exception.
Public classMongoConfigurationException
Represents a MongoDB configuration exception.
Public classMongoConnectionClosedException
Represents a MongoDB connection failed exception.
Public classMongoConnectionException
Represents a MongoDB connection exception.
Public classMongoCredential
Credential to access a MongoDB database.
Public classMongoCursor
An object that can be enumerated to fetch the results of a query. The query is not sent to the server until you begin enumerating the results.
Public classMongoCursorTDocument
An object that can be enumerated to fetch the results of a query. The query is not sent to the server until you begin enumerating the results.
Public classMongoCursorNotFoundException
Represents a MongoDB cursor not found exception.
Public classMongoDatabase
Represents a MongoDB database and the settings used to access it. This class is thread-safe.
Public classMongoDatabaseBase
Base class for implementors of IMongoDatabase.
Public classMongoDatabaseSettings
The settings used to access a database.
Public classMongoDBRef
Represents a DBRef (a convenient way to refer to a document).
Public classMongoDBRefSerializer
Represents a serializer for MongoDBRefs.
Public classMongoDefaults
Default values for various Mongo settings.
Public classMongoDuplicateKeyException
Represents a MongoDB duplicate key exception.
Public classMongoException
Represents a MongoDB exception.
Public classMongoExecutionTimeoutException
Represents a MongoDB execution timeout exception.
Public classMongoExternalIdentity
Represents an identity defined outside of mongodb.
Public classMongoIdentity
Represents an identity in MongoDB.
Public classMongoIdentityEvidence
Evidence used as proof of a MongoIdentity.
Public classMongoIncompatibleDriverException
Represents a MongoDB incompatible driver exception.
Public classMongoIndexManagerBaseTDocument
Public classMongoInsertOptions
Represents the options to use for an Insert or InsertBatch operation.
Public classMongoInternalException
Represents a MongoDB internal exception (almost surely the result of a bug).
Public classMongoInternalIdentity
Represents an identity defined inside mongodb.
Public classMongoNodeIsRecoveringException
Represents a MongoDB node is recovering exception.
Public classMongoNotPrimaryException
Represents a MongoDB not primary exception.
Public classMongoQueryException
Represents a MongoDB query exception.
Public classMongoServer
Represents a MongoDB server (either a single instance or a replica set) and the settings used to access it. This class is thread-safe.
Public classMongoServerAddress
The address of a MongoDB server.
Public classMongoServerBuildInfo
Represents build info about a server instance.
Public classMongoServerException
Represents a MongoDB server exception.
Public classMongoServerInstance
Represents an instance of a MongoDB server host.
Public classMongoServerSettings
The settings used to access a MongoDB server.
Public classMongoUpdateOptions
Represents the options to use for an Update operation.
Public classMongoUrl
Represents an immutable URL style connection string. See also MongoUrlBuilder.
Public classMongoUrlBuilder
Represents URL style connection strings. This is the recommended connection string style, but see also MongoConnectionStringBuilder if you wish to use .NET style connection strings.
Public classMongoUser Obsolete.
Represents a MongoDB user.
Public classMongoUtils
Various static utility methods.
Public classMongoWaitQueueFullException
Represents a MongoDB connection pool wait queue full exception.
Public classMongoWriteConcernException
Represents a MongoDB write concern exception.
Public classMongoWriteException
Represents a write exception.
Public classObjectCommandTResult
An Object based command.
Public classObjectFilterDefinitionTDocument
An Object based filter.
Public classObjectProjectionDefinitionTSource
An Object based projection whose projection type is not yet known.
Public classObjectProjectionDefinitionTSource, TProjection
An Object based projection.
Public classObjectSortDefinitionTDocument
An Object based sort.
Public classObjectUpdateDefinitionTDocument
An Object based update.
Public classOptional
Public classParallelScanArgs
Represents arguments for the ParallelScan command helper method.
Public classParallelScanArgsTDocument
Represents arguments for the ParallelScan command helper method.
Public classPasswordEvidence
Evidence of a MongoIdentity via a shared secret.
Public classPipelineDefinitionTInput, TOutput
Base class for a pipeline.
Public classPipelineStageDefinitionTInput, TOutput
Base class for pipeline stages.
Public classPipelineStagePipelineDefinitionTInput, TOutput
A pipeline composed of instances of IPipelineStageDefinition.
Public classProjectionDefinitionTSource
Base class for projections whose projection type is not yet known.
Public classProjectionDefinitionTSource, TProjection
Base class for projections.
Public classProjectionDefinitionBuilderTSource
A builder for a projection.
Public classProjectionDefinitionExtensions
Extension methods for projections.
Public classQueryDocument
Represents a BSON document that can be used where an IMongoQuery is expected.
Public classReadConcern
Represents a read concern.
Public classReadPreference
Represents a read preference.
Public classRenameCollectionOptions
Options for renaming a collection.
Public classRenderedCommandTResult
A rendered command.
Public classRenderedFieldDefinition
A rendered field.
Public classRenderedFieldDefinitionTField
A rendered field.
Public classRenderedPipelineDefinitionTOutput
A rendered pipeline.
Public classRenderedPipelineStageDefinitionTOutput
A rendered pipeline stage.
Public classRenderedProjectionDefinitionTProjection
A rendered projection.
Public classReplaceOneModelTDocument
Model for replacing a single document.
Public classReplaceOneResult
The result of an update operation.
Public classReplaceOneResultAcknowledged
The result of an acknowledged update operation.
Public classReplaceOneResultUnacknowledged
The result of an unacknowledged update operation.
Public classScopeDocument
Represents a BSON document that can be used where an IMongoScope is expected.
Public classSortByDocument
Represents a BSON document that can be used where an IMongoSortBy is expected.
Public classSortDefinitionTDocument
Base class for sorts.
Public classSortDefinitionBuilderTDocument
Public classSortDefinitionExtensions
Extension methods for SortDefinition.
Public classSslSettings
Represents the settings for using SSL.
Public classStringFieldDefinitionTDocument
A String based field name.
Public classStringFieldDefinitionTDocument, TField
A String based field name.
Public classSystemProfileInfo
Represents a document from the system.profile collection.
Public classSystemProfileInfoSerializer
Represents a serializer for SystemProfileInfo.
Public classSystemProfileLockStatistics
Statistics about locks for a system.profile document.
Public classSystemProfileLockStatisticsSerializer
Serializer for SystemProfileLockStatistics
Public classSystemProfileReadWriteLockStatistics
Statistics about system.profile read and write time spent in locks.
Public classSystemProfileReadWriteLockStatisticsSerializer
Serializer for SystemProfileReadWriteLockStatistics
Public classTag
Represents a replica set member tag.
Public classTagSet
Represents a replica set member tag set.
Public classTextSearchOptions
Represents text search options.
Public classUpdateDefinitionTDocument
Base class for updates.
Public classUpdateDefinitionBuilderTDocument
Public classUpdateDefinitionExtensions
Extension methods for UpdateDefinition.
Public classUpdateDocument
Represents a BSON document that can be used where an IMongoUpdate is expected.
Public classUpdateManyModelTDocument
Model for updating many documents.
Public classUpdateOneModelTDocument
Model for updating a single document.
Public classUpdateOptions
Options for updating a single document.
Public classUpdateResult
The result of an update operation.
Public classUpdateResultAcknowledged
The result of an acknowledgede update operation.
Public classUpdateResultUnacknowledged
The result of an acknowledgede update operation.
Public classValidateCollectionArgs
Represents arguments for the Validate collection command helper method.
Public classValidateCollectionResult
Represents the results of a validate collection command.
Public classValidateCollectionResultExtentDetails
Represents the details of the first extent of the collection.
Public classWriteConcern
Represents a write concern.
Public classWriteConcernWCount
Represents a numeric WValue.
Public classWriteConcernWMode
Represents a mode string WValue.
Public classWriteConcernWValue
Represents the base class for w values.
Public classWriteConcernError
Represents the details of a write concern error.
Public classWriteConcernResult
Represents the results of an operation performed with an acknowledged WriteConcern.
Public classWriteError
Represents the details of a write error.
Public classWriteModelTDocument
Base class for a write model.
Public classXYPoint
Represents a 2D point represented using x, y coordinates.
Structures
Interfaces
  InterfaceDescription
Public interfaceIAggregateFluentTResult
Fluent interface for aggregate.
Public interfaceIAsyncCursorTDocument
Represents an asynchronous cursor.
Public interfaceIAsyncCursorSourceTDocument
Represents an operation that will return a cursor when executed.
Public interfaceIFilteredMongoCollectionTDocument
A filtered mongo collection. The filter will be and'ed with all filters.
Public interfaceIFindFluentTDocument, TProjection
Fluent interface for find.
Public interfaceIMongoClient
The client interface to MongoDB.
Public interfaceIMongoCollectionTDocument
Represents a typed collection in MongoDB.
Public interfaceIMongoCollectionOptions
A marker interface that represents options for creating a collection (see CollectionOptionsDocument and the CollectionOptions builder).
Public interfaceIMongoCommand
A marker interface that represents a command (see CommandDocument).
Public interfaceIMongoDatabase
Representats a database in MongoDB.
Public interfaceIMongoFields
A marker interface that represents a list of fields (see FieldsDocument and the Fields builder).
Public interfaceIMongoGeoHaystackSearchOptions Obsolete.
A marker interface that represents geo haystack search options (see GeoSearchHaystackOptionsDocument and the GeoHaystackSearchOptions builder).
Public interfaceIMongoGeoNearOptions Obsolete.
A marker interface that represents geo search options (see GeoNearOptionsDocument and the GeoNearOptions builder).
Public interfaceIMongoGroupBy
A marker interface that represents what to group by (see GroupByDocument and the GroupBy builder).
Public interfaceIMongoIndexKeys
A marker interface that represents the keys of an index (see IndexKeysDocument and the IndexKeys builder).
Public interfaceIMongoIndexManagerTDocument
An interface representing methods used to create, delete and modify indexes.
Public interfaceIMongoIndexOptions
A marker interface that represents options for creating an index (see IndexOptionsDocument and the IndexOptions builder).
Public interfaceIMongoQuery
A marker interface that represents a query (see QueryDocument and the Query builder).
Public interfaceIMongoScope
A marker interface that represents a scope (a set of variables with values, see ScopeDocument).
Public interfaceIMongoSortBy
A marker interface that represents a sort order (see SortByDocument and the SortBy builder).
Public interfaceIMongoUpdate
A marker interface that represents an update modifier (see UpdateDocument and the Update builder).
Public interfaceIOrderedAggregateFluentTResult
Fluent interface for aggregate.
Public interfaceIOrderedFindFluentTDocument, TProjection
Fluent interface for find.
Public interfaceIPipelineStageDefinition
A pipeline stage.
Public interfaceIRenderedPipelineStageDefinition
A rendered pipeline stage.
Enumerations
  EnumerationDescription
Public enumerationAggregateOutputMode
Represents the output mode for an aggregate operation.
Public enumerationCollectionSystemFlags
Represents collection system flags.
Public enumerationCollectionUserFlags
Represents collection user flags.
Public enumerationConnectionMode
Server connection mode.
Public enumerationCursorType
The cursor type.
Public enumerationDocumentValidationAction
Represents the document validation action.
Public enumerationDocumentValidationLevel
Represents the document validation level.
Public enumerationEvalFlags
Flags used with the Eval method in MongoDatabase.
Public enumerationFeatureId
Represents the Id of a feature.
Public enumerationFindAndModifyDocumentVersion
Represents a version of a document (original or modified).
Public enumerationInsertFlags
Flags used with the Insert method in MongoCollection.
Public enumerationMapReduceOutputMode
Represents the output mode for a map-reduce operation.
Public enumerationMongoServerInstanceType
Represents an instance of a MongoDB server host (in the case of a replica set a MongoServer uses multiple MongoServerInstances).
Public enumerationMongoServerState
The state of a MongoServer instance.
Public enumerationProfilingLevel
Represents what level of profile information to write.
Public enumerationQueryFlags
Flags used with queries (see the SetQueryFlags method of MongoCursor).
Public enumerationReadConcernLevel
The leve of the read concern.
Public enumerationReadPreferenceMode
Represents the read preference mode.
Public enumerationRemoveFlags
Flags used with the Remove method of MongoCollection.
Public enumerationReturnDocument
Which version of the document to return when executing a FindAndModify command.
Public enumerationServerErrorCategory
Represents the category for an error from the server.
Public enumerationSortDirection
The direction of the sort.
Public enumerationUpdateDefinitionCurrentDateType
The type to use for a $currentDate operator.
Public enumerationUpdateFlags
Flags used with the Update method in MongoCollection.
Public enumerationWriteModelType
The type of a write model.