public string PostRegistrarSalida(SalidaProductoRequest request) { var service = new RegistrarSalidaProductoService(_unitOfWork, _productoRepository); var response = service.Handle(request); return(response); }
public void Setup() { var optionsSqlite = new DbContextOptionsBuilder <InventarioContext>() .UseSqlite(@"Data Source=C:\\sqlite\\InventarioDBTest.db") .Options; _dbContext = new InventarioContext(optionsSqlite); _dbContext.Database.EnsureDeleted(); _dbContext.Database.EnsureCreated(); _productoRepository = new ProductoRepository(_dbContext); _registrarSalidaProductoService = new RegistrarSalidaProductoService( new UnitOfWork(_dbContext), _productoRepository ); }
public void Setup() { var optionsSqlite = new DbContextOptionsBuilder <InventarioContext>() .UseInMemoryDatabase(@"InventarioInmemory") .Options; _dbContext = new InventarioContext(optionsSqlite); _dbContext.Database.EnsureDeleted(); _dbContext.Database.EnsureCreated(); _productoRepository = new ProductoRepository(_dbContext); _registrarSalidaProductoService = new RegistrarSalidaProductoService( new UnitOfWork(_dbContext), _productoRepository ); }