public GoodIdentificationMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = GoodIdentificationMvosControllerUtils.ParseIdString(id); var conv = new GoodIdentificationMvoStateEventDtoConverter(); var se = _goodIdentificationMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToGoodIdentificationMvoStateEventDto(se)); } catch (Exception ex) { var response = GoodIdentificationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IGoodIdentificationMvoStateDto Get(string id, string fields = null) { try { var idObj = GoodIdentificationMvosControllerUtils.ParseIdString(id); var state = _goodIdentificationMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new GoodIdentificationMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = GoodIdentificationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }