public void Patch(string id, [FromBody] MergePatchProductCategoryDto value) { try { ProductCategoriesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _productCategoryApplicationService.When(value as IMergePatchProductCategory); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchProductCategoryDto c) { var idObj = (c as IMergePatchProductCategory).ProductCategoryId; var uriParameters = new ProductCategoryUriParameters(); uriParameters.Id = idObj; var req = new ProductCategoryPatchRequest(uriParameters, (MergePatchProductCategoryDto)c); var resp = await _ramlClient.ProductCategory.Patch(req); ProductCategoryProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchProductCategoryDto c) { WhenAsync(c).GetAwaiter().GetResult(); }