public IActionResult Get(int id) { try { UnitPaymentCorrectionNote model = _facade.ReadById(id); UnitPaymentCorrectionNoteViewModel viewModel = _mapper.Map <UnitPaymentCorrectionNoteViewModel>(model); return(Ok(new { apiVersion = ApiVersion, statusCode = General.OK_STATUS_CODE, message = General.OK_MESSAGE, data = viewModel, })); } catch (Exception e) { Dictionary <string, object> Result = new ResultFormatter(ApiVersion, General.INTERNAL_ERROR_STATUS_CODE, e.Message) .Fail(); return(StatusCode(General.INTERNAL_ERROR_STATUS_CODE, Result)); } }