public Editorial AddEditorial(Editorial editorial) { foreach (Editorial aux in editorialRepository.GetAll()) { if ((editorial.Name == aux.Name) || (editorial.EditorialID == aux.EditorialID)) { return(null); } } if (editorialRepository.AddEditorial(editorial) == null) { return(null); } return(editorial); }