public async Task <GetByNameAuthorView> GetByName(string name) { Author author = await _authorRepository.GetByName(name); var result = new GetByNameAuthorView(); result.Id = author.Id; result.Name = author.Name; return(result); }
public async Task <IActionResult> GetByTitle(string name) { GetByNameAuthorView getByNameAuthor = await _authorService.GetByName(name); return(Ok(getByNameAuthor)); }