public IAttributeValueMvoStateEvent GetStateEvent(string id, long version) { try { var idObj = AttributeValueMvosControllerUtils.ParseIdString(id); return(_attributeValueMvoApplicationService.GetStateEvent(idObj, version)); } catch (Exception ex) { var response = AttributeValueMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public AttributeValueMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = AttributeValueMvosControllerUtils.ParseIdString(id); var conv = new AttributeValueMvoStateEventDtoConverter(); var se = _attributeValueMvoApplicationService.GetStateEvent(idObj, version); return(se == null ? null : conv.ToAttributeValueMvoStateEventDto(se)); } catch (Exception ex) { var response = AttributeValueMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IAttributeValueMvoStateDto Get(string id, string fields = null) { try { var idObj = AttributeValueMvosControllerUtils.ParseIdString(id); var state = _attributeValueMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new AttributeValueMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = AttributeValueMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }