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
collectionNamestringThe name of the collection that should be queried.
Returns
- IMongoCollection<T>
A MongoDB.Driver.IMongoCollection<TDocument> for the named collection.
Type Parameters
TThe type of items returned by the collection.