Пример #1
0
        public async Task <IActionResult> GetAuthorById([FromRoute] int id)
        {
            var author = await _authorManager.GetAuthorWithVideos(id);

            if (author == null)
            {
                return(BadRequest("Author not found"));
            }

            var response = _mapper.Map <AuthorResponse>(author);

            return(Ok(response));
        }