Ejemplo n.º 1
0
        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);
        }