Exemplo n.º 1
0
        public void Add(AuthorInsertDTO authorInsertDTO)
        {
            Author author = Mapper.Map <Author>(authorInsertDTO);

            if (author == null)
            {
                throw new NotFoundException();
            }
            if (!_authorRepository.AddSaveChanges(author))
            {
                throw new InternalServerErrorException();
            }
        }