Click or drag to resize
IMongoDatabase Interface
Representats a database in MongoDB.

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
public interface IMongoDatabase

The IMongoDatabase type exposes the following members.

Methods
  NameDescription
Public methodCreateCollection
Creates the collection with the specified name.
Public methodCreateCollectionAsync
Creates the collection with the specified name.
Public methodCreateViewTDocument, TResult
Creates a view.
Public methodCreateViewAsyncTDocument, TResult
Creates a view.
Public methodDropCollection
Drops the collection with the specified name.
Public methodDropCollectionAsync
Drops the collection with the specified name.
Public methodGetCollectionTDocument
Gets a collection.
Public methodListCollections
Lists all the collections on the server.
Public methodListCollectionsAsync
Lists all the collections on the server.
Public methodRenameCollection
Renames the collection.
Public methodRenameCollectionAsync
Renames the collection.
Public methodRunCommandTResult
Runs a command.
Public methodRunCommandAsyncTResult
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
Properties
  NameDescription
Public propertyClient
Gets the client.
Public propertyDatabaseNamespace
Gets the namespace of the database.
Public propertySettings
Gets the settings.
Top
Remarks
This interface is not guaranteed to remain stable. Implementors should use MongoDatabaseBase.
See Also