public PhysicalInventoryLineMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = PhysicalInventoryLineMvosControllerUtils.ParseIdString(id);
         var conv  = new PhysicalInventoryLineMvoStateEventDtoConverter();
         var se    = _physicalInventoryLineMvoApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToPhysicalInventoryLineMvoStateEventDto(se));
     } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
 public IPhysicalInventoryLineMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = PhysicalInventoryLineMvosControllerUtils.ParseIdString(id);
         var state = _physicalInventoryLineMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new PhysicalInventoryLineMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }