Click or drag to resize

MongoDatabaseBase Class

Base class for implementors of IMongoDatabase.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverMongoDatabaseBase

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public abstract class MongoDatabaseBase : IMongoDatabase

The MongoDatabaseBase type exposes the following members.

Constructors
  NameDescription
Protected methodMongoDatabaseBase
Initializes a new instance of the MongoDatabaseBase class
Top
Properties
  NameDescription
Public propertyClient
Gets the client.
Public propertyDatabaseNamespace
Gets the namespace of the database.
Public propertySettings
Gets the settings.
Top
Methods
  NameDescription
Public methodAggregateTResult(PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateTResult(IClientSessionHandle, PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateAsyncTResult(PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateAsyncTResult(IClientSessionHandle, PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateToCollectionTResult(PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateToCollectionTResult(IClientSessionHandle, PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateToCollectionAsyncTResult(PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodAggregateToCollectionAsyncTResult(IClientSessionHandle, PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
Public methodCreateCollection(String, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
Public methodCreateCollection(IClientSessionHandle, String, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
Public methodCreateCollectionAsync(String, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
Public methodCreateCollectionAsync(IClientSessionHandle, String, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
Public methodCreateViewTDocument, TResult(String, String, PipelineDefinitionTDocument, TResult, CreateViewOptionsTDocument, CancellationToken)
Creates a view.
Public methodCreateViewTDocument, TResult(IClientSessionHandle, String, String, PipelineDefinitionTDocument, TResult, CreateViewOptionsTDocument, CancellationToken)
Creates a view.
Public methodCreateViewAsyncTDocument, TResult(String, String, PipelineDefinitionTDocument, TResult, CreateViewOptionsTDocument, CancellationToken)
Creates a view.
Public methodCreateViewAsyncTDocument, TResult(IClientSessionHandle, String, String, PipelineDefinitionTDocument, TResult, CreateViewOptionsTDocument, CancellationToken)
Creates a view.
Public methodDropCollection(String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollection(String, DropCollectionOptions, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollection(IClientSessionHandle, String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollection(IClientSessionHandle, String, DropCollectionOptions, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(String, DropCollectionOptions, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(IClientSessionHandle, String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(IClientSessionHandle, String, DropCollectionOptions, CancellationToken)
Drops the collection with the specified name.
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 methodGetCollectionTDocument
Gets a collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodListCollectionNames(ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Public methodListCollectionNames(IClientSessionHandle, ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Public methodListCollectionNamesAsync(ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Public methodListCollectionNamesAsync(IClientSessionHandle, ListCollectionNamesOptions, CancellationToken)
Lists the names of all the collections in the database.
Public methodListCollections(ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
Public methodListCollections(IClientSessionHandle, ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
Public methodListCollectionsAsync(ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
Public methodListCollectionsAsync(IClientSessionHandle, ListCollectionsOptions, CancellationToken)
Lists all the collections in the database.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRenameCollection(String, String, RenameCollectionOptions, CancellationToken)
Renames the collection.
Public methodRenameCollection(IClientSessionHandle, String, String, RenameCollectionOptions, CancellationToken)
Renames the collection.
Public methodRenameCollectionAsync(String, String, RenameCollectionOptions, CancellationToken)
Renames the collection.
Public methodRenameCollectionAsync(IClientSessionHandle, String, String, RenameCollectionOptions, CancellationToken)
Renames the collection.
Public methodRunCommandTResult(CommandTResult, ReadPreference, CancellationToken)
Runs a command.
Public methodRunCommandTResult(IClientSessionHandle, CommandTResult, ReadPreference, CancellationToken)
Runs a command.
Public methodRunCommandAsyncTResult(CommandTResult, ReadPreference, CancellationToken)
Runs a command.
Public methodRunCommandAsyncTResult(IClientSessionHandle, CommandTResult, ReadPreference, CancellationToken)
Runs a command.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWatchTResult(PipelineDefinitionChangeStreamDocumentBsonDocument, TResult, ChangeStreamOptions, CancellationToken)
Watches changes on all collections in a database.
Public methodWatchTResult(IClientSessionHandle, PipelineDefinitionChangeStreamDocumentBsonDocument, TResult, ChangeStreamOptions, CancellationToken)
Watches changes on all collections in a database.
Public methodWatchAsyncTResult(PipelineDefinitionChangeStreamDocumentBsonDocument, TResult, ChangeStreamOptions, CancellationToken)
Watches changes on all collections in a database.
Public methodWatchAsyncTResult(IClientSessionHandle, PipelineDefinitionChangeStreamDocumentBsonDocument, TResult, ChangeStreamOptions, CancellationToken)
Watches changes on all collections in a database.
Public methodWithReadConcern
Returns a new IMongoDatabase instance with a different read concern setting.
Public methodWithReadPreference
Returns a new IMongoDatabase instance with a different read preference setting.
Public methodWithWriteConcern
Returns a new IMongoDatabase instance with a different write concern setting.
Top
Extension Methods
  NameDescription
Public Extension MethodAggregate(AggregateOptions)Overloaded.
Begins a fluent aggregation interface.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodAggregate(IClientSessionHandle, AggregateOptions)Overloaded.
Begins a fluent aggregation interface.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodAsQueryable(AggregateOptions)Overloaded.
Creates a queryable source of documents.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodAsQueryable(IClientSessionHandle, AggregateOptions)Overloaded.
Creates a queryable source of documents.
(Defined by IMongoDatabaseExtensions.)
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 MethodWatch(ChangeStreamOptions, CancellationToken)Overloaded.
Watches changes on all collection in a database.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodWatch(IClientSessionHandle, ChangeStreamOptions, CancellationToken)Overloaded.
Watches changes on all collection in a database.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodWatchAsync(ChangeStreamOptions, CancellationToken)Overloaded.
Watches changes on all collection in a database.
(Defined by IMongoDatabaseExtensions.)
Public Extension MethodWatchAsync(IClientSessionHandle, ChangeStreamOptions, CancellationToken)Overloaded.
Watches changes on all collection in a database.
(Defined by IMongoDatabaseExtensions.)
Top
See Also