Пример #1
0
 public void Patch(string id, [FromBody] MergePatchRejectionReasonDto value)
 {
     try {
         RejectionReasonsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _rejectionReasonApplicationService.When(value as IMergePatchRejectionReason);
     } catch (Exception ex) { var response = RejectionReasonsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchRejectionReasonDto c)
        {
            var idObj         = (c as IMergePatchRejectionReason).RejectionReasonId;
            var uriParameters = new RejectionReasonUriParameters();

            uriParameters.Id = idObj;

            var req  = new RejectionReasonPatchRequest(uriParameters, (MergePatchRejectionReasonDto)c);
            var resp = await _ramlClient.RejectionReason.Patch(req);

            RejectionReasonProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchRejectionReasonDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }