public async Task <IActionResult> Update(int id, [FromBody] ProductCategoryMeta productCategoryMeta) { var result = await _productCategoryService.Update(CurrentUser.TenantId, CurrentUser.Id, CurrentUser.FullName, id, productCategoryMeta); if (result.Code <= 0) { return(BadRequest(result)); } return(Ok(result)); }
protected void DbFetchProductCategoryChildren() { ProductCategoryMeta itemMeta = new ProductCategoryMeta(); SelectStatement select = new SelectStatement(itemMeta); select.Where.Add(itemMeta.FK_ParentProductCategoryID.ChildForeignKey[0], this.GetPrimaryKeyValue()[0]); this.ProductCategoryChildren = (EntityCollection<ProductCategoryEntity, ProductCategoryMeta>)select.Execute(); SetOldProductCategoryChildrenIDs(); }