public async Task <IActionResult> Delete(int id) { try { await _genresService.Delete(id); return(new NoContentResult()); } catch (InvalidOperationException) { return(NotFound(new { message = "Genre with specified id is not found" })); } }
public async Task <EntityDto> Delete(long id) { var result = await _genresService.Delete(id, true); return(result); }