public Livro ConsultarPorISBN(string ISBN) { Livro l = repositorio.ConsultarPorISBN(ISBN); if (l != null) { return(l); } else { throw new Exception("O Livro não foi encontrado."); } }
public bool ISBNIgualEspec(Livro l) { Livro livro = new Livro(); l = repositorio.ConsultarPorISBN(l.ISBN); if (l == null) { return(false); } else { throw new Exception("Já existe livro com o ISBN informado."); } }