IRepository(T, TKey).Collection Property

MongoRepository

IRepositoryT, TKeyCollection Property
Gets the Mongo collection (to perform advanced operations).

Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
MongoCollection<T> Collection { get; }
ReadOnly Property Collection As MongoCollection(Of T)
	Get
property MongoCollection<T>^ Collection {
	MongoCollection<T>^ get ();
}
abstract Collection : MongoCollection<'T> with get

Property Value

Type: MongoCollectionT
The Mongo collection (to perform advanced operations).
Remarks
One can argue that exposing this property (and with that, access to it's Database property for instance (which is a "parent")) is not the responsibility of this class. Use of this property is highly discouraged; for most purposes you can use the MongoRepositoryManager<T>
See Also