예제 #1
0
        public async Task <ActionResult <BookAuthor> > GetBookAuthorByAuthorIdAsync(int authorId)
        {
            BookAuthor dbBookAuthor = await _repository.GetBookAuthorAsync(authorId);

            if (dbBookAuthor == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <Data.Models.BookAuthor>(dbBookAuthor)));
        }