public OrderRoleMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version) { try { var idObj = OrderRoleMvosControllerUtils.ParseIdString(id); var conv = new OrderRoleMvoStateEventDtoConverter(); var se = _orderRoleMvoApplicationService.GetEvent(idObj, version); return(se == null ? null : conv.ToOrderRoleMvoStateEventDto(se)); } catch (Exception ex) { var response = OrderRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public IOrderRoleMvoStateDto Get(string id, string fields = null) { try { var idObj = OrderRoleMvosControllerUtils.ParseIdString(id); var state = _orderRoleMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new OrderRoleMvoStateDtoWrapper(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = OrderRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }