Ejemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchPicklistDto value)
 {
     try {
         PicklistsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _picklistApplicationService.When(value as IMergePatchPicklist);
     } catch (Exception ex) { var response = PicklistsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchPicklistDto c)
        {
            var idObj         = (c as IMergePatchPicklist).PicklistId;
            var uriParameters = new PicklistUriParameters();

            uriParameters.Id = idObj;

            var req  = new PicklistPatchRequest(uriParameters, (MergePatchPicklistDto)c);
            var resp = await _ramlClient.Picklist.Patch(req);

            PicklistProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchPicklistDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }