Ejemplo n.º 1
0
        public new Result Delete(int id)
        {
            var metaObjects = dbContext.Queryable <MetaObject>().Where(t => t.ApplicationId == id).ToList();

            if (metaObjects != null && metaObjects.Any())
            {
                TransactionHelper.Transaction(() =>
                {
                    //删除应用下的所有对象
                    foreach (var item in metaObjects)
                    {
                        metaObjectService.Delete(item.Id);
                    }
                });
            }
            base.Delete(id);
            return(Result.Success());
        }
 public IActionResult Delete(int id)
 {
     metaObjectService.Delete(id);
     return(JsonResultModel.Success("删除成功"));
 }