Esempio n. 1
0
 public IAttributeUseMvoStateEvent GetStateEvent(string id, long version)
 {
     try {
         var idObj = AttributeUseMvosControllerUtils.ParseIdString(id);
         return(_attributeUseMvoApplicationService.GetStateEvent(idObj, version));
     } catch (Exception ex) { var response = AttributeUseMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Esempio n. 2
0
 public AttributeUseMvoStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = AttributeUseMvosControllerUtils.ParseIdString(id);
         var conv  = new AttributeUseMvoStateEventDtoConverter();
         var se    = _attributeUseMvoApplicationService.GetStateEvent(idObj, version);
         return(se == null ? null : conv.ToAttributeUseMvoStateEventDto(se));
     } catch (Exception ex) { var response = AttributeUseMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Esempio n. 3
0
 public AttributeUseMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = AttributeUseMvosControllerUtils.ParseIdString(id);
         var state = (AttributeUseMvoState)_attributeUseMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new AttributeUseMvoStateDto(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = AttributeUseMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }