Table of Contents

Property this

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

this[string]

Gets a MongoCollection instance representing a collection on this database with a default document type of BsonDocument.

[Obsolete("Use GetCollection instead.")]
public virtual MongoCollection<BsonDocument> this[string collectionName] { get; }

Parameters

collectionName string

The name of the collection.

Property Value

MongoCollection<BsonDocument>

An instance of MongoCollection.

this[string, WriteConcern]

Gets a MongoCollection instance representing a collection on this database with a default document type of BsonDocument.

[Obsolete("Use GetCollection instead.")]
public virtual MongoCollection<BsonDocument> this[string collectionName, WriteConcern writeConcern] { get; }

Parameters

collectionName string

The name of the collection.

writeConcern WriteConcern

The write concern to use when accessing this collection.

Property Value

MongoCollection<BsonDocument>

An instance of MongoCollection.