public bool Delete(long transportadorId)
        {
            var _transportador = _context.Transportadores.Where(c => c.Id == transportadorId).FirstOrDefault();

            if (_transportador == null)
            {
                throw new NotFoundException();
            }
            _context.Entry(_transportador).State = EntityState.Deleted;
            return(_context.SaveChanges() > 0);
        }
        public bool Delete(long id)
        {
            var contaCorrente = _context.Produtos.Where(c => c.Id == id).FirstOrDefault();

            if (contaCorrente == null)
            {
                throw new NotFoundException();
            }
            _context.Entry(contaCorrente).State = EntityState.Deleted;
            return(_context.SaveChanges() > 0);
        }
        public bool Delete(long objeto)
        {
            var destinatario = _context.Destinatarios.Where(c => c.Id == objeto).FirstOrDefault();

            if (destinatario == null)
            {
                throw new NotFoundException();
            }
            _context.Entry(destinatario).State = EntityState.Deleted;
            return(_context.SaveChanges() > 0);
        }
        public bool Delete(long id)
        {
            var notaFiscal = _context.NotasFiscais.Where(c => c.Id == id).FirstOrDefault();

            if (notaFiscal == null)
            {
                throw new NotFoundException();
            }
            _context.Entry(notaFiscal).State = EntityState.Deleted;
            return(_context.SaveChanges() > 0);
        }
 public bool Update(Emitente emitente)
 {
     _context.Entry(emitente).State = EntityState.Modified;
     return(_context.SaveChanges() > 0);
 }