public OrderShipGroupMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = OrderShipGroupMvosControllerUtils.ParseIdString(id); var conv = new OrderShipGroupMvoStateEventDtoConverter(); var se = _orderShipGroupMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToOrderShipGroupMvoStateEventDto(se)); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IOrderShipGroupMvoStateDto Get(string id, string fields = null) { try { var idObj = OrderShipGroupMvosControllerUtils.ParseIdString(id); var state = _orderShipGroupMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new OrderShipGroupMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }