Example #1
0
        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);
        }
Example #2
0
        public async Task <IActionResult> GetByTitle(string name)
        {
            GetByNameAuthorView getByNameAuthor = await _authorService.GetByName(name);

            return(Ok(getByNameAuthor));
        }