public OrderService(IOrderDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _orders = database.GetCollection <Order>(settings.OrdersCollectionName); }
public MongoDbManager(IOrderDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var db = client.GetDatabase(settings.DatabaseName); Orders = db.GetCollection <Order>(settings.OrdersCollectionName); }
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; }