MongoDatabaseBaseGetCollectionTDocument Method |
Gets a collection.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax public abstract IMongoCollection<TDocument> GetCollection<TDocument>(
string name,
MongoCollectionSettings settings = null
)
Public MustOverride Function GetCollection(Of TDocument) (
name As String,
Optional settings As MongoCollectionSettings = Nothing
) As IMongoCollection(Of TDocument)
abstract GetCollection :
name : string *
?settings : MongoCollectionSettings
(* Defaults:
let _settings = defaultArg settings null
*)
-> IMongoCollection<'TDocument>
Parameters
- name
- Type: SystemString
The name of the collection. - settings (Optional)
- Type: MongoDB.DriverMongoCollectionSettings
The settings.
Type Parameters
- TDocument
- The document type.
Return Value
Type:
IMongoCollectionTDocumentAn implementation of a collection.
Implements
IMongoDatabaseGetCollectionTDocument(String, MongoCollectionSettings)See Also