Esempio n. 1
0
        public IActionResult Delete(long id)
        {
            if (!authorService.CanBeDeleted(id))
            {
                return(BadRequestWithErrors("The author can't be deleted, because it has some books."));
            }

            authorService.DeleteAuthor(id);
            return(Ok());
        }