Пример #1
0
        public bool Deletar(long id)
        {
            if (id <= 0)
            {
                throw new ExcecaoIdentificadorInvalido();
            }

            var notaFiscal = _notaFiscalRepositorio.ObterPorTransportadorID(id);

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

            return(_transportadorRepositorio.Deletar(id));
        }