public IActionResult Save([FromBody] GeneralModel model) { try { int result = _service.Add(model); return(Ok(CustomResponse.ok(result, ResponseMsg.RECORD_SAVED.Value))); } catch (Exception ex) { if (Utils.evaluateException(ex) != null) { return(Ok(CustomResponse.badRequest(Utils.evaluateException(ex)))); } _logger.LogError(ex.Message); return(BadRequest(ex.Message)); } }