Table of Contents

Constructor MongoCollection

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

MongoCollection(MongoDatabase, string, MongoCollectionSettings)

Creates a new instance of MongoCollection. Normally you would call one of the indexers or GetCollection methods of MongoDatabase instead.

[Obsolete("Use database.GetCollection() instead.")]
public MongoCollection(MongoDatabase database, string name, MongoCollectionSettings settings)

Parameters

database MongoDatabase

The database that contains this collection.

name string

The name of the collection.

settings MongoCollectionSettings

The settings to use to access this collection.