Пример #1
0
 public ItemIssuanceMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = ItemIssuanceMvosControllerUtils.ParseIdString(id);
         var conv  = new ItemIssuanceMvoStateEventDtoConverter();
         var se    = _itemIssuanceMvoApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToItemIssuanceMvoStateEventDto(se));
     } catch (Exception ex) { var response = ItemIssuanceMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Пример #2
0
 public IItemIssuanceMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = ItemIssuanceMvosControllerUtils.ParseIdString(id);
         var state = _itemIssuanceMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new ItemIssuanceMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = ItemIssuanceMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }