Example #1
0
 public void Patch(string id, [FromBody] MergePatchContactMechDto value)
 {
     try {
         ContactMechesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _contactMechApplicationService.When(value as IMergePatchContactMech);
     } catch (Exception ex) { var response = ContactMechesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Example #2
0
        public async Task WhenAsync(MergePatchContactMechDto c)
        {
            var idObj         = (c as IMergePatchContactMech).ContactMechId;
            var uriParameters = new ContactMechUriParameters();

            uriParameters.Id = idObj;

            var req  = new ContactMechPatchRequest(uriParameters, (MergePatchContactMechDto)c);
            var resp = await _ramlClient.ContactMech.Patch(req);

            ContactMechProxyUtils.ThrowOnHttpResponseError(resp);
        }
Example #3
0
 public void When(MergePatchContactMechDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }