Click or drag to resize

MongoDatabaseBase.GetCollection<TDocument> Method

Gets a collection.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public abstract 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.

Implements

IMongoDatabase.GetCollection<TDocument>(String, MongoCollectionSettings)
See Also