public ActionResult <IEnumerable <BookDto> > GetBooksForAuthor(Guid authorId) { if (!_bookLibraryRepository.AuthorExists(authorId)) { return(NotFound()); } var booksForAuthorFromRepo = _bookLibraryRepository.GetBooks(authorId); return(Ok(_mapper.Map <IEnumerable <BookDto> >(booksForAuthorFromRepo))); }