Esempio n. 1
0
        public OrderService(IOrderDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _orders = database.GetCollection <Order>(settings.OrdersCollectionName);
        }
Esempio n. 2
0
        public MongoDbManager(IOrderDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);
            var db     = client.GetDatabase(settings.DatabaseName);

            Orders = db.GetCollection <Order>(settings.OrdersCollectionName);
        }
Esempio n. 3
0
        public OrderService(IOrderDatabaseSettings DbSettings, IBackendServiceSettings BackendSettings)
        {
            var client   = new MongoClient(DbSettings.ConnectionString);
            var database = client.GetDatabase(DbSettings.DatabaseName);

            _Orders          = database.GetCollection <Order>(DbSettings.OrdersCollectionName);
            _BackendSettings = BackendSettings;
        }