示例#1
0
 public ProductCategoryMemberStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = ProductCategoryMembersControllerUtils.ParseIdString(id);
         var conv  = new ProductCategoryMemberStateEventDtoConverter();
         var se    = _productCategoryMemberApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToProductCategoryMemberStateEventDto(se));
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
示例#2
0
 public IProductCategoryMemberStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = ProductCategoryMembersControllerUtils.ParseIdString(id);
         var state = _productCategoryMemberApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new ProductCategoryMemberStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }