/// <summary> /// Gets a collections for the type TDocument with a partition key. /// </summary> /// <typeparam name="TDocument">The document type.</typeparam> /// <param name="partitionKey">The collection partition key.</param> /// <returns></returns> protected virtual IMongoCollection <TDocument> GetCollection <TDocument>(string partitionKey = null) where TDocument : IDocument <Guid> { return(MongoDbContext.GetCollection <TDocument>(partitionKey)); }
/// <summary> /// The private GetCollection method /// </summary> /// <typeparam name="TEntity"></typeparam> /// <returns></returns> private IMongoCollection <TEntity> GetCollection <TEntity>() { return(_mongoDbContext.GetCollection <TEntity>()); }