Exemple #1
0
        public MongoDbCustomersInformationStore(MongoDbConfiguration configuration)
        {
            var client   = new MongoClient(configuration.ConnectionString);
            var database = client.GetDatabase(configuration.DatabaseName);

            customersCollection = database.GetCollection <CustomerDocument>(configuration.CustomersCollectionName);
        }
Exemple #2
0
        public MongoDbTestsFixture()
        {
            runner = MongoDbRunner.Start();

            Configuration = new MongoDbConfiguration
            {
                ConnectionString        = runner.ConnectionString,
                DatabaseName            = DatabaseName,
                CustomersCollectionName = CustomersCollectionName
            };

            var client   = new MongoClient(runner.ConnectionString);
            var database = client.GetDatabase(DatabaseName);

            CustomersCollection = database.GetCollection <BsonDocument>(CustomersCollectionName);
        }