public IActionResult DeleteAuthor(Guid authorId) { var authorFromRepo = _bookLibraryRepository.GetAuthor(authorId); if (authorFromRepo == null) { return(NotFound()); } _bookLibraryRepository.DeleteAuthor(authorFromRepo); _bookLibraryRepository.Save(); return(NoContent()); }