Table of Contents

Property this

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

this[string]

Gets a MongoDatabase instance representing a database on this server.

[Obsolete("Use GetDatabase instead.")]
public virtual MongoDatabase this[string databaseName] { get; }

Parameters

databaseName string

The name of the database.

Property Value

MongoDatabase

A new or existing instance of MongoDatabase.

this[string, WriteConcern]

Gets a MongoDatabase instance representing a database on this server.

[Obsolete("Use GetDatabase instead.")]
public virtual MongoDatabase this[string databaseName, WriteConcern writeConcern] { get; }

Parameters

databaseName string

The name of the database.

writeConcern WriteConcern

The write concern to use with this database.

Property Value

MongoDatabase

A new or existing instance of MongoDatabase.