Пример #1
0
 public OrderItemMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = OrderItemMvosControllerUtils.ParseIdString(id);
         var conv  = new OrderItemMvoStateEventDtoConverter();
         var se    = _orderItemMvoApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToOrderItemMvoStateEventDto(se));
     } catch (Exception ex) { var response = OrderItemMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Пример #2
0
 public IOrderItemMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = OrderItemMvosControllerUtils.ParseIdString(id);
         var state = _orderItemMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new OrderItemMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = OrderItemMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }