Exemple #1
0
 public void Patch(string id, [FromBody] MergePatchProductDto value)
 {
     try {
         ProductsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _productApplicationService.When(value as IMergePatchProduct);
     } catch (Exception ex) { var response = ProductsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemple #2
0
        public async Task WhenAsync(MergePatchProductDto c)
        {
            var idObj         = (c as IMergePatchProduct).ProductId;
            var uriParameters = new ProductUriParameters();

            uriParameters.Id = idObj;

            var req  = new ProductPatchRequest(uriParameters, (MergePatchProductDto)c);
            var resp = await _ramlClient.Product.Patch(req);

            ProductProxyUtils.ThrowOnHttpResponseError(resp);
        }
Exemple #3
0
 public void When(MergePatchProductDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }