public MongoDbRepositoryBase(IMongoDbSetting settings)
        {
            IMongoDatabase database = new MongoClient(settings.ConnectionString).GetDatabase(settings.DatabaseName);

            _collection = database.GetCollection <T>(GetCollectionName(typeof(T)));
        }
示例#2
0
 public UserRepository(IMongoDbSetting mongoDbSetting)
 {
     _mongoDbSetting = mongoDbSetting;
 }
示例#3
0
 public DbFactory(IMongoDbSetting mongoDbSetting)
 {
     _mongoDbSetting = mongoDbSetting;
 }
示例#4
0
        public MongoRepository(IMongoDbSetting settings)
        {
            var database = new MongoClient(settings.ConnectionString).GetDatabase(settings.DatabaseName);

            _collection = database.GetCollection <TDocument>(GetCollectionName(typeof(TDocument)));
        }