public void Patch(string id, [FromBody] MergePatchProductCategoryMemberDto value) { try { ProductCategoryMembersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _productCategoryMemberApplicationService.When(value as IMergePatchProductCategoryMember); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteProductCategoryMemberDto value) { try { // /////////////////////////////// if (value.Version != default(long)) { value.CommandType = CommandType.MergePatch; ProductCategoryMembersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _productCategoryMemberApplicationService.When(value as IMergePatchProductCategoryMember); return; } // /////////////////////////////// ProductCategoryMembersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _productCategoryMemberApplicationService.When(value as ICreateProductCategoryMember); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }