示例#1
0
        public async Task <ActionResult <Author> > GetAuthorByAuthorIdAsync(int authorId)
        {
            Author dbAuthor = await _repository.GetAuthorAsync(authorId);

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

            return(Ok(_mapper.Map <Data.Models.Author>(dbAuthor)));
        }