Ejemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchAttributeUseMvoDto value)
 {
     try {
         AttributeUseMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeUseMvoApplicationService.When(value as IMergePatchAttributeUseMvo);
     } catch (Exception ex) { var response = AttributeUseMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchAttributeUseMvoDto c)
        {
            var idObj         = AttributeUseMvoProxyUtils.ToIdString((c as IMergePatchAttributeUseMvo).AttributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new AttributeUseMvoPatchRequest(uriParameters, (MergePatchAttributeUseMvoDto)c);
            var resp = await _ramlClient.AttributeUseMvo.Patch(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchAttributeUseMvoDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }