Table of Contents

Namespace MongoDB.Driver

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

AggregateArgs

Represents options for the Aggregate command.

BulkUpdateRequestBuilder<TDocument>

Represents a fluent builder for one update request.

BulkWriteOperation<TDocument>

Represents a fluent builder for a bulk operation.

BulkWriteRequestBuilder<TDocument>

Represents a fluent builder for a write request (either a remove or an update).

CollectionOptionsDocument

Represents a BSON document that can be used where an IMongoCollectionOptions is expected.

CollectionStatsResult

Represents the results of the collection stats command.

CollectionStatsResult.IndexSizesResult

Represents a collection of index sizes.

CommandDocument

Represents a BSON document that can be used where an IMongoCommand is expected.

CommandResult

Represents the result of a command (there are also subclasses for various commands).

CommandResultSerializer<TCommandResult>

Represents a serializer for a CommandResult.

CountArgs

Represents arguments for the Count command helper method.

CreateViewOptionsDocument

Represents a BSON document that can be used where an IMongoCreateViewOptions is expected.

DatabaseStatsResult

Represents the result of the database stats command.

DistinctArgs

Represents arguments for the Distinct command helper method.

EvalArgs

Represents arguments for the Eval command helper method.

FieldsDocument

Represents a BSON document that can be used where an IMongoFields is expected.

FindAndModifyArgs

Represents options for the FindAndModify command.

FindAndModifyResult

Represents the result of a FindAndModify command.

FindAndRemoveArgs

Represents options for the FindAndRemove command.

FindOneArgs

Represents arguments to the FindOne method.

GeoHaystackSearchArgs

Represents the arguments to the GeoHaystackSearch method.

GeoHaystackSearchOptionsDocument

Represents a BSON document that can be used where an IMongoGeoHaystackSearchOptions is expected.

GeoHaystackSearchResult

Represents the result of a GeoHaystackSearch command.

GeoHaystackSearchResult.GeoHaystackSearchHit

Represents a GeoHaystackSearch hit.

GeoHaystackSearchResult.GeoHaystackSearchHits

Represents a collection of GeoHaystackSearch hits.

GeoHaystackSearchResult.GeoHaystackSearchStats

Represents the stats of a GeoHaystackSearch command.

GeoHaystackSearchResult<TDocument>

Represents the result of a GeoHaystackSearch command.

GeoHaystackSearchResult<TDocument>.GeoHaystackSearchHit

Represents a GeoHaystackSearch hit.

GeoHaystackSearchResult<TDocument>.GeoHaystackSearchHits

Represents a collection of GeoHaystackSearch hits.

GeoNearArgs

Represents the arguments to the GeoNear method.

GeoNearOptionsDocument

Represents a BSON document that can be used where an IMongoGeoNearOptions is expected.

GeoNearPoint

Represents a GeoNearPoint (wraps either an XYPoint or a GeoJsonPoint).

GeoNearPoint.GeoJson<TCoordinates>

Represents a GeoNearPoint that wraps a GeoJsonPoint.

GeoNearPoint.Legacy

Represents a GeoNearPoint that wraps an XYPoint.

GeoNearResult

Represents the result of a GeoNear command.

GeoNearResult.GeoNearHit

Represents a GeoNear hit.

GeoNearResult.GeoNearHits

Represents a collection of GeoNear hits.

GeoNearResult.GeoNearStats

Represents the stats of a GeoNear command.

GeoNearResult<TDocument>

Represents the result of a GeoNear command.

GeoNearResult<TDocument>.GeoNearHit

Represents a GeoNear hit.

GeoNearResult<TDocument>.GeoNearHits

Represents a collection of GeoNear hits.

GetIndexesResult

Represents the result of GetIndexes.

GetProfilingLevelResult

Represents the results of a GetProfilingLevel command.

GetStatsArgs

Represents arguments for the GetStats command helper method.

GroupArgs

Represents arguments for the Group command helper method.

GroupByDocument

Represents a BSON document that can be used where an IMongoGroupBy is expected.

IndexInfo

Represents information about an index.

IndexKeysDocument

Represents a BSON document that can be used where an IMongoIndexKeys is expected.

IndexOptionsDocument

Represents a BSON document that can be used where an IMongoIndexOptions is expected.

MapReduceArgs

Represents arguments for the MapReduce command helper method.

MapReduceResult

Represents the result of a map-reduce command.

MongoClientExtensions

Represents extension methods on MongoClient.

MongoCollection

Represents a MongoDB collection and the settings used to access it. This class is thread-safe.

MongoCollection<TDefaultDocument>

Represents a MongoDB collection and the settings used to access it as well as a default document type. This class is thread-safe.

MongoCursor

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.

MongoCursor<TDocument>

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.

MongoDatabase

Represents a MongoDB database and the settings used to access it. This class is thread-safe.

MongoInsertOptions

Represents the options to use for an Insert or InsertBatch operation.

MongoServer

Represents a MongoDB server (either a single instance or a replica set) and the settings used to access it. This class is thread-safe.

MongoServerInstance

Represents an instance of a MongoDB server host.

MongoServerSettings

The settings used to access a MongoDB server.

MongoUpdateOptions

Represents the options to use for an Update operation.

MongoUser

Represents a MongoDB user.

ParallelScanArgs

Represents arguments for the ParallelScan command helper method.

ParallelScanArgs<TDocument>

Represents arguments for the ParallelScan command helper method.

QueryDocument

Represents a BSON document that can be used where an IMongoQuery is expected.

RemoveArgs

Represents arguments to the Remove method.

ScopeDocument

Represents a BSON document that can be used where an IMongoScope is expected.

SortByDocument

Represents a BSON document that can be used where an IMongoSortBy is expected.

SystemProfileInfo

Represents a document from the system.profile collection.

SystemProfileInfoSerializer

Represents a serializer for SystemProfileInfo.

SystemProfileLockStatistics

Statistics about locks for a system.profile document.

SystemProfileLockStatisticsSerializer

Serializer for SystemProfileLockStatistics

SystemProfileReadWriteLockStatistics

Statistics about system.profile read and write time spent in locks.

SystemProfileReadWriteLockStatisticsSerializer

Serializer for SystemProfileReadWriteLockStatistics

UpdateDocument

Represents a BSON document that can be used where an IMongoUpdate is expected.

ValidateCollectionArgs

Represents arguments for the Validate collection command helper method.

ValidateCollectionResult

Represents the results of a validate collection command.

ValidateCollectionResult.ExtentDetails

Represents the details of the first extent of the collection.

XYPoint

Represents a 2D point represented using x, y coordinates.

Interfaces

IMongoCollectionOptions

A marker interface that represents options for creating a collection (see CollectionOptionsDocument and the CollectionOptions builder).

IMongoCommand

A marker interface that represents a command (see CommandDocument).

IMongoCreateViewOptions

A marker interface that represents options for creating a view (see CreateViewOptionsDocument and the CreateViewOptions builder).

IMongoFields

A marker interface that represents a list of fields (see FieldsDocument and the Fields builder).

IMongoGeoHaystackSearchOptions

A marker interface that represents geo haystack search options (see GeoSearchHaystackOptionsDocument and the GeoHaystackSearchOptions builder).

IMongoGeoNearOptions

A marker interface that represents geo search options (see GeoNearOptionsDocument and the GeoNearOptions builder).

IMongoGroupBy

A marker interface that represents what to group by (see GroupByDocument and the GroupBy builder).

IMongoIndexKeys

A marker interface that represents the keys of an index (see IndexKeysDocument and the IndexKeys builder).

IMongoIndexOptions

A marker interface that represents options for creating an index (see IndexOptionsDocument and the IndexOptions builder).

IMongoQuery

A marker interface that represents a query (see QueryDocument and the Query builder).

IMongoScope

A marker interface that represents a scope (a set of variables with values, see ScopeDocument).

IMongoSortBy

A marker interface that represents a sort order (see SortByDocument and the SortBy builder).

IMongoUpdate

A marker interface that represents an update modifier (see UpdateDocument and the Update builder).

Enums

AggregateOutputMode

Represents the output mode for an aggregate operation.

CollectionSystemFlags

Represents collection system flags.

CollectionUserFlags

Represents collection user flags.

EvalFlags

Flags used with the Eval method in MongoDatabase.

FeatureId

Represents the Id of a feature.

FindAndModifyDocumentVersion

Represents a version of a document (original or modified).

InsertFlags

Flags used with the Insert method in MongoCollection.

MapReduceOutputMode

Represents the output mode for a map-reduce operation.

MongoServerInstanceType

Represents an instance of a MongoDB server host (in the case of a replica set a MongoServer uses multiple MongoServerInstances).

MongoServerState

The state of a MongoServer instance.

ProfilingLevel

Represents what level of profile information to write.

QueryFlags

Flags used with queries (see the SetQueryFlags method of MongoCursor).

RemoveFlags

Flags used with the Remove method of MongoCollection.

UpdateFlags

Flags used with the Update method in MongoCollection.