Table of Contents

Method GetCollection

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

GetCollection<T>(string)

Get an MongoDB.Driver.IMongoCollection<TDocument> associated with a MongoDB collection by name.

public IMongoCollection<T> GetCollection<T>(string collectionName)

Parameters

collectionName string

The name of the collection that should be queried.

Returns

IMongoCollection<T>

A MongoDB.Driver.IMongoCollection<TDocument> for the named collection.

Type Parameters

T

The type of items returned by the collection.