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); } }
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); } }