Click or drag to resize
IMongoDatabase.GetCollection<TDocument> Method
Gets a collection.

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
IMongoCollection<TDocument> GetCollection<TDocument>(
	string name,
	MongoCollectionSettings settings = null
)

Parameters

name
Type: System.String
The name of the collection.
settings (Optional)
Type: MongoDB.Driver.MongoCollectionSettings
The settings.

Type Parameters

TDocument
The document type.

Return Value

Type: IMongoCollection<TDocument>
An implementation of a collection.
See Also