public async Task <ActionResult <GenreDTO> > Delete(int id) { if (!await genreService.IsAnyGenreDefinedAsync(id)) { return(NotFound()); } await genreService.DeleteGenreAsync(id); return(NoContent()); }
public async Task <IActionResult> DeleteGenreAsync([GreaterThanZero] int id) { await _genreService.DeleteGenreAsync(id); return(NoContent()); }