Click or drag to resize

IMongoDatabase Interface

Represents a database in MongoDB.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax
public interface IMongoDatabase

The IMongoDatabase type exposes the following members.

Properties
  NameDescription
Public propertyClient
Gets the client.
Public propertyDatabaseNamespace
Gets the namespace of the database.
Public propertySettings
Gets the settings.
Top
Methods
  NameDescription
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(IClientSessionHandle, String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(String, CancellationToken)
Drops the collection with the specified name.
Public methodDropCollectionAsync(IClientSessionHandle, String, CancellationToken)
Drops the collection with the specified name.
Public methodGetCollectionTDocument
Gets a collection.
Public methodListCollections(ListCollectionsOptions, CancellationToken)
Lists all the collections on the server.
Public methodListCollections(IClientSessionHandle, ListCollectionsOptions, CancellationToken)
Lists all the collections on the server.
Public methodListCollectionsAsync(ListCollectionsOptions, CancellationToken)
Lists all the collections on the server.
Public methodListCollectionsAsync(IClientSessionHandle, ListCollectionsOptions, CancellationToken)
Lists all the collections on the server.
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 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
Remarks
This interface is not guaranteed to remain stable. Implementors should use MongoDatabaseBase.
See Also