Exemplo n.º 1
0
        public async Task <ActionResult <AuthorDTO> > GetAuthor(int authorId)
        {
            if (authorId <= 0)
            {
                return(BadRequest());
            }

            var author = await _authorServices.GetOne(authorId);

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

            return(Ok(author));
        }