public IHttpActionResult GetAuthorById(int authorId) { AuthorServices authorService = CreateAuthorService(); var author = authorService.GetAuthorById(authorId); return(Ok(author)); }
public IActionResult GetAuthorById(int id) { var author = _authorService.GetAuthorById(id); if (author == null) { return(NotFound()); } return(Ok(author)); }
public IActionResult GetAuthorById(int id) { var author = _authorServices.GetAuthorById(id); return(Ok(author)); }
public async Task <ActionResult <Author> > GetAuthor(int id) { return(Ok(new { data = await _authorServices.GetAuthorById(id), success = true })); }