示例#1
0
        public IActionResult AddGenreToTrack(long id, [FromBody] GenreDTO genreDTO)
        {
            try
            {
                TrackService.AddGenreToTrack(id, genreDTO);
            }
            catch (ArgumentException e)
            {
                log.LogError("The track with the id :" + id + " does not exist." + e.Message);
                return(NotFound(StatusCodes.Status404NotFound));
            }

            return(Ok(StatusCodes.Status200OK));
        }