Table of Contents

Method GetCollection

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

GetCollection<TDocument>(string, MongoCollectionSettings)

Gets a collection.

public abstract IMongoCollection<TDocument> GetCollection<TDocument>(string name, MongoCollectionSettings settings = null)

Parameters

name string

The name of the collection.

settings MongoCollectionSettings

The settings.

Returns

IMongoCollection<TDocument>

An implementation of a collection.

Type Parameters

TDocument

The document type.