public void Patch(string id, [FromBody] MergePatchSupplierProductDto value) { try { SupplierProductsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _supplierProductApplicationService.When(value as IMergePatchSupplierProduct); } catch (Exception ex) { var response = SupplierProductsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchSupplierProductDto c) { var idObj = SupplierProductProxyUtils.ToIdString((c as IMergePatchSupplierProduct).SupplierProductId); var uriParameters = new SupplierProductUriParameters(); uriParameters.Id = idObj; var req = new SupplierProductPatchRequest(uriParameters, (MergePatchSupplierProductDto)c); var resp = await _ramlClient.SupplierProduct.Patch(req); SupplierProductProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchSupplierProductDto c) { WhenAsync(c).GetAwaiter().GetResult(); }