public DocumentRepository(IMongoClient client)
        {
            _client = client;
            _logger = ConsoleFactory.CreateLogger();

            _db = _client.GetDatabase(database);
        }
コード例 #2
0
        public DocumentController()
        {
            _logger = ConsoleFactory.CreateLogger();

            //Want to prevent hardcoding of the mongoClient IP.
            //mongodb://localhost:27017/
            _documentRepo = new DocumentRepository(new MongoClient("mongodb://localhost:27017"));
        }
 public StorageController()
 {
     _logger = ConsoleFactory.CreateLogger();
     //Want to prevent hardcoding of the mongoClient IP.
     _dataStoreRepo = new StorageRepository(new MongoClient("mongodb://localhost:27017/"));
 }