Beispiel #1
0
        public void Deletar(int?id)
        {
            try
            {
                var genero = this.Detalhar(id);

                if (!this.PodeExcluir(genero))
                {
                    throw new Exception("Gênero já associado a um livro.");
                }

                if (genero != null)
                {
                    generoDAL.Deletar(genero);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }