public virtual IActionResult Delete(int id) { try { _service.Delete(id); return(NoContent()); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }