last ...
This commit is contained in:
@@ -8,7 +8,6 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.Linq;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.Extensions;
|
||||
@@ -34,6 +33,7 @@ namespace xDataService.MongoRepositories
|
||||
public List<WriteModel<T>> bulkCollection;
|
||||
public readonly IMongoCollection<T> collection;
|
||||
private readonly IXKeyGenerator<T, TKey> keyGenerator;
|
||||
public readonly XDataBaseConfiguration dbConfiguration;
|
||||
public readonly XDataServiceConfiguration configuration;
|
||||
private readonly IXBaseRepositoryEvents<T> baseRepositoryEvents;
|
||||
#endregion
|
||||
@@ -41,6 +41,7 @@ namespace xDataService.MongoRepositories
|
||||
//
|
||||
#region Constructor ...
|
||||
protected XBaseMongoRepository(
|
||||
XDataBaseConfiguration dbConfiguration,
|
||||
XDataServiceConfiguration configuration,
|
||||
string collectionName = null,
|
||||
IXKeyGenerator<T, TKey> keyGenerator = null,
|
||||
@@ -54,11 +55,12 @@ namespace xDataService.MongoRepositories
|
||||
.IsNullOrEmpty() ?
|
||||
typeof(T).Name :
|
||||
collectionName;
|
||||
this.dbConfiguration = dbConfiguration;
|
||||
this.baseRepositoryEvents = baseRepositoryEvents;
|
||||
|
||||
//
|
||||
var client = new MongoClient(configuration.GetMongoDbURI());
|
||||
var database = client.GetDatabase(configuration.GetMongoDbDatabase());
|
||||
var client = new MongoClient(dbConfiguration.GetMongoDbURI());
|
||||
var database = client.GetDatabase(dbConfiguration.GetMongoDbDatabase());
|
||||
|
||||
//
|
||||
bulkCollection = new List<WriteModel<T>>();
|
||||
|
||||
Reference in New Issue
Block a user