public void Patch(string id, [FromBody] MergePatchPartyDto value) { try { PartiesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _partyApplicationService.When(value as IMergePatchParty); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchPartyDto c) { var idObj = (c as IMergePatchParty).PartyId; var uriParameters = new PartyUriParameters(); uriParameters.Id = idObj; var req = new PartyPatchRequest(uriParameters, (MergePatchPartyDto)c); var resp = await _ramlClient.Party.Patch(req); PartyProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchPartyDto c) { WhenAsync(c).GetAwaiter().GetResult(); }