Esempio n. 1
0
        public bool AddProducto(Producto Producto)
        {
            try
            {
                if (Producto != null)
                {
                    _context.Producto.Add(Producto);
                }
                _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(false);
            }
        }
Esempio n. 2
0
        public async Task <bool> AddProductoFacturado(ProductoFacturado ProductoFacturado)
        {
            try
            {
                if (ProductoFacturado != null)
                {
                    await _context.AddAsync(ProductoFacturado);
                }
                _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(false);
            }
        }
Esempio n. 3
0
        public async Task <bool> AddPuntoVenta(PuntoVenta PuntoVenta)
        {
            try
            {
                if (PuntoVenta != null)
                {
                    await _context.AddAsync(PuntoVenta);
                }
                _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(false);
            }
        }