public MongoDBRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
 {
     _mongoDbContext      = mongoDbContext;
     _httpContextAccessor = serviceProvider.GetService <IHttpContextAccessor>();
     _collection          = _mongoDbContext.Collection <TData>();
     Collection           = _mongoDbContext.Collection <TData>();
 }
        //BsonDocument
        public MongoDBRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
        {
            _mongoDbContext = mongoDbContext;

            _collection = _mongoDbContext.Collection <TEntity>();
            _principal  = serviceProvider.GetService <IPrincipal>();
        }
Exemple #3
0
 public MongoDBRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
 {
     _mongoDbContext = mongoDbContext;
     _collection     = _mongoDbContext.Collection <TData>();
     Collection      = _mongoDbContext.Collection <TData>();
 }
Exemple #4
0
 public CustomerMongoRepository(MongoDbContextBase mongoDbContext, string collectionName) : base(mongoDbContext.mongoConnectionSettings, collectionName)
 {
 }
Exemple #5
0
 //BsonDocument
 public MongoRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
 {
     _mongoDbContext = mongoDbContext;
     Collection      = _mongoDbContext.Collection <TEntity>();
 }