示例#1
0
 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); }
 }
示例#2
0
        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);
        }
示例#3
0
 public void When(MergePatchOrganizationStructureDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }