public ActionResult <SuccessResponse> Delete(int id) { int code = 200; BaseResponse response = null; try { _service.Delete(id); response = new SuccessResponse(); } catch (Exception ex) { code = 500; response = new ErrorResponse(ex.Message); base.Logger.LogError(ex.ToString()); } return(StatusCode(responseCode, response)); }