public void Patch(string id, [FromBody] MergePatchOrganizationStructureDto value) { try { OrganizationStructuresControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _organizationStructureApplicationService.When(value as IMergePatchOrganizationStructure); } catch (Exception ex) { var response = OrganizationStructuresControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchOrganizationStructureDto c) { var idObj = OrganizationStructureProxyUtils.ToIdString((c as IMergePatchOrganizationStructure).Id); var uriParameters = new OrganizationStructureUriParameters(); uriParameters.Id = idObj; var req = new OrganizationStructurePatchRequest(uriParameters, (MergePatchOrganizationStructureDto)c); var resp = await _ramlClient.OrganizationStructure.Patch(req); OrganizationStructureProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchOrganizationStructureDto c) { WhenAsync(c).GetAwaiter().GetResult(); }