Ejemplo n.º 1
0
        public async Task <IActionResult> GetGenreById([FromRoute] int id)
        {
            var genre = await _genreManager.GetGenreWithVideos(id);

            if (genre == null)
            {
                return(BadRequest("Genre not found"));
            }

            var response = _mapper.Map <GenreResponse>(genre);

            return(Ok(response));
        }