public void Patch(string id, [FromBody] MergePatchAttributeSetDto value) { try { AttributeSetsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _attributeSetApplicationService.When(value as IMergePatchAttributeSet); } catch (Exception ex) { var response = AttributeSetsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchAttributeSetDto c) { var idObj = (c as IMergePatchAttributeSet).AttributeSetId; var uriParameters = new AttributeSetUriParameters(); uriParameters.Id = idObj; var req = new AttributeSetPatchRequest(uriParameters, (MergePatchAttributeSetDto)c); var resp = await _ramlClient.AttributeSet.Patch(req); AttributeSetProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchAttributeSetDto c) { WhenAsync(c).GetAwaiter().GetResult(); }