예제 #1
0
        public async Task <ActionResult <GenreDTO> > Delete(int id)
        {
            if (!await genreService.IsAnyGenreDefinedAsync(id))
            {
                return(NotFound());
            }

            await genreService.DeleteGenreAsync(id);

            return(NoContent());
        }
예제 #2
0
        public async Task <IActionResult> DeleteGenreAsync([GreaterThanZero] int id)
        {
            await _genreService.DeleteGenreAsync(id);

            return(NoContent());
        }