Ejemplo n.º 1
0
        public EntradaProductoResponse PostEntradaProducto(EntradaProductoRequest request)
        {
            var service  = new ProductoEntradaService(_unitOfWork, _productoRepository);
            var response = service.Ejecutar(request);

            return(response);
        }
        public void Setup()
        {
            //Arrange
            var optionsSqlite = new DbContextOptionsBuilder <ventasContext>()
                                .UseSqlite(@"Data Source=ventasDataBaseTest.db")
                                .Options;

            _dbContext = new ventasContext(optionsSqlite);
            _dbContext.Database.EnsureDeleted();
            _dbContext.Database.EnsureCreated();

            _entradaService = new ProductoEntradaService(
                new UnitOfWork(_dbContext),
                new ProductoRepository(_dbContext));
        }