public ShipmentReceiptMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = ShipmentReceiptMvosControllerUtils.ParseIdString(id);
         var conv  = new ShipmentReceiptMvoStateEventDtoConverter();
         var se    = _shipmentReceiptMvoApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToShipmentReceiptMvoStateEventDto(se));
     } catch (Exception ex) { var response = ShipmentReceiptMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
 public IShipmentReceiptMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = ShipmentReceiptMvosControllerUtils.ParseIdString(id);
         var state = _shipmentReceiptMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new ShipmentReceiptMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = ShipmentReceiptMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }