public IInOutLineMvoStateEvent GetStateEvent(string id, long version) { try { var idObj = InOutLineMvosControllerUtils.ParseIdString(id); return(_inOutLineMvoApplicationService.GetStateEvent(idObj, version)); } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public InOutLineMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = InOutLineMvosControllerUtils.ParseIdString(id); var conv = new InOutLineMvoStateEventDtoConverter(); var se = _inOutLineMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToInOutLineMvoStateEventDto(se)); } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IInOutLineMvoStateDto Get(string id, string fields = null) { try { var idObj = InOutLineMvosControllerUtils.ParseIdString(id); var state = _inOutLineMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new InOutLineMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }