public OrderItemShipGrpInvReservationStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = OrderItemShipGrpInvReservationsControllerUtils.ParseIdString(id); var conv = new OrderItemShipGrpInvReservationStateEventDtoConverter(); var se = _orderItemShipGrpInvReservationApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToOrderItemShipGrpInvReservationStateEventDto(se)); } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IOrderItemShipGrpInvReservationStateDto Get(string id, string fields = null) { try { var idObj = OrderItemShipGrpInvReservationsControllerUtils.ParseIdString(id); var state = _orderItemShipGrpInvReservationApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new OrderItemShipGrpInvReservationStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }