Example #1
0
 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>();
        }
Example #3
0
 public MongoDBRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
 {
     _mongoDbContext = mongoDbContext;
     _collection     = _mongoDbContext.Collection <TData>();
     Collection      = _mongoDbContext.Collection <TData>();
 }
Example #4
0
 //BsonDocument
 public MongoRepository(IServiceProvider serviceProvider, MongoDbContextBase mongoDbContext)
 {
     _mongoDbContext = mongoDbContext;
     Collection      = _mongoDbContext.Collection <TEntity>();
 }