public OrdenCompraService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _ordenCompra = database.GetCollection <OrdenCompra>("inventory.ordenCompra"); }
public InventoryService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _inventory = database.GetCollection <Inventory>(settings.CollectionName); }
public ArticuloSuplidorService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _articuloSup = database.GetCollection <ArticuloSuplidor>("inventory.articuloSuplidor"); }
public MovimientoInventarioService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _movimientoInventario = database.GetCollection <MovimientoInventario>("movimientoInventario"); }
public ArticuloService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _articulo = database.GetCollection <Articulo>(settings.InventoryCollectionName); }
public ProductService(IInventoryDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _products = database.GetCollection <Product>(settings.InventoryCollectionName); }
public MongoRepository(IInventoryDatabaseSettings settings) { var clientSettings = MongoClientSettings.FromConnectionString(settings.ConnectionString); var options = new InstrumentationOptions { CaptureCommandText = true }; clientSettings.ClusterConfigurator = cb => cb.Subscribe(new DiagnosticsActivityEventSubscriber(options)); var database = new MongoClient(clientSettings).GetDatabase(settings.DatabaseName); _collection = database.GetCollection <TDocument>(GetCollectionName(typeof(TDocument))); }
public InventoryService(IInventoryRepository InventoryRepository, IInventoryDatabaseSettings Settings, IFileReader FileReader) { _inventoryRepository = InventoryRepository; _filePath = Settings.FilePath; _fileReader = FileReader; }
public DBConnection(IInventoryDatabaseSettings inventoryDatabaseSettings) { _inventoryDatabaseSettings = inventoryDatabaseSettings; }