Ejemplo n.º 1
0
        public bool Deletar(long id)
        {
            if (id < 1)
            {
                throw new ExcecaoIdentificadorInvalido();
            }

            var notaFiscal = _notaFiscalRepositorio.ObterPorEmitenteID(id);

            if (notaFiscal != null)
            {
                throw new ExcecaoChaveEstrangeira();
            }

            return(_emitenteRepositorio.Deletar(id));
        }