Example #1
0
 public InventoryItemEntryMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = InventoryItemEntryMvosControllerUtils.ParseIdString(id);
         var conv  = new InventoryItemEntryMvoStateEventDtoConverter();
         var se    = _inventoryItemEntryMvoApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToInventoryItemEntryMvoStateEventDto(se));
     } catch (Exception ex) { var response = InventoryItemEntryMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Example #2
0
 public IInventoryItemEntryMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = InventoryItemEntryMvosControllerUtils.ParseIdString(id);
         var state = _inventoryItemEntryMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new InventoryItemEntryMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = InventoryItemEntryMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }