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); } }
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); } }
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); } }