public ActionResult Delete(int id) { try { if (_chinookSupervisor.GetGenreById(id) == null) { return(NotFound()); } if (_chinookSupervisor.DeleteGenre(id)) { return(Ok()); } return(StatusCode(500)); } catch (Exception ex) { return(StatusCode(500, ex)); } }