The MongoDbRepository now has a constructor that takes an IMongoDatabase.

This commit is contained in:
alexandre-spieser
2017-11-01 08:18:29 +00:00
parent fbb07475a1
commit 657beeac99
18 changed files with 52 additions and 29 deletions
@@ -900,6 +900,15 @@ namespace MongoDbGenericRepository
MongoDbContext = mongoDbContext;
}
/// <summary>
/// The contructor taking a <see cref="IMongoDatabase"/>.
/// </summary>
/// <param name="mongoDatabase">A mongodb context implementing <see cref="IMongoDatabase"/></param>
protected BaseMongoRepository(IMongoDatabase mongoDatabase)
{
MongoDbContext = new MongoDbContext(mongoDatabase);
}
/// <summary>
/// The MongoDbContext
/// </summary>
@@ -2009,6 +2018,7 @@ namespace MongoDbGenericRepository
}
/// <summary>
/// Groups filtered a collection of documents given a grouping criteria,
/// and returns a dictionary of listed document groups with keys having the different values of the grouping criteria.
/// </summary>