public IHttpActionResult GetAuthorById(int authorId)
        {
            AuthorServices authorService = CreateAuthorService();
            var            author        = authorService.GetAuthorById(authorId);

            return(Ok(author));
        }
Ejemplo n.º 2
0
        public IActionResult GetAuthorById(int id)
        {
            var author = _authorService.GetAuthorById(id);

            if (author == null)
            {
                return(NotFound());
            }
            return(Ok(author));
        }
Ejemplo n.º 3
0
        public IActionResult GetAuthorById(int id)
        {
            var author = _authorServices.GetAuthorById(id);

            return(Ok(author));
        }
Ejemplo n.º 4
0
 public async Task <ActionResult <Author> > GetAuthor(int id)
 {
     return(Ok(new { data = await _authorServices.GetAuthorById(id), success = true }));
 }