public IActionResult Delete(int id) { try { service.Delete(id); return(new NoContentResult()); } catch (ArgumentNullException ex) { return(NotFound(ex)); } catch (Exception ex) { return(BadRequest(ex)); } }