public ActionResult <BookDto> GetBookForAuthor(Guid authorId, Guid bookId) { if (!_bookLibraryRepository.AuthorExists(authorId)) { return(NotFound()); } var bookForAuthorFromRepo = _bookLibraryRepository.GetBook(authorId, bookId); if (bookForAuthorFromRepo == null) { return(NotFound()); } return(Ok(_mapper.Map <BookDto>(bookForAuthorFromRepo))); }