public ItemIssuanceMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = ItemIssuanceMvosControllerUtils.ParseIdString(id); var conv = new ItemIssuanceMvoStateEventDtoConverter(); var se = _itemIssuanceMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToItemIssuanceMvoStateEventDto(se)); } catch (Exception ex) { var response = ItemIssuanceMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IItemIssuanceMvoStateDto Get(string id, string fields = null) { try { var idObj = ItemIssuanceMvosControllerUtils.ParseIdString(id); var state = _itemIssuanceMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new ItemIssuanceMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = ItemIssuanceMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }