public AttributeAliasMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = AttributeAliasMvosControllerUtils.ParseIdString(id); var conv = new AttributeAliasMvoStateEventDtoConverter(); var se = _attributeAliasMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToAttributeAliasMvoStateEventDto(se)); } catch (Exception ex) { var response = AttributeAliasMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IAttributeAliasMvoStateDto Get(string id, string fields = null) { try { var idObj = AttributeAliasMvosControllerUtils.ParseIdString(id); var state = _attributeAliasMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new AttributeAliasMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = AttributeAliasMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }