Exemplo n.º 1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        public new ResultModel Delete(int id)
        {
            var metaObject = GetById(id);

            TransactionHelper.Transaction(() =>
            {
                //把相关字段一并删除
                metaFieldService.DeleteByMetaObjectId(id);
                metaFieldService.DeleteByMetaObjectId(id);
                fieldListService.DeleteByMetaObjectId(id);       //删除相关子对象
                interfaceAggregationService.DeleteByMetaObjectId(id);
                searchConditionService.DeleteByMetaObjectId(id); //删除相关子对象
                triggerScriptService.DeleteByMetaObjectId(id);
                //这里补充待删除的子对象
                //...
                base.Delete(id);
            });
            return(ResultModel.Success());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        public new Result <MetaObject> Delete(int id)
        {
            var metaObject = GetById(id);

            TransactionHelper.Transaction(() =>
            {
                //把相关字段一并删除
                //删除字段
                metaFieldService.DeleteByMetaObjectId(id);
                //删除列表
                fieldListService.DeleteByMetaObjectId(id);//删除相关子对象
                //删除接口
                interfaceAggregationService.DeleteByMetaObjectId(id);
                //删除搜索条件
                searchConditionService.DeleteByMetaObjectId(id);//删除相关子对象
                //删除触发器
                triggerScriptService.DeleteByMetaObjectId(id);
                //删除表单
                _formService.DeleteByMetaObjectId(id);
                //这里要补充待删除的子对象
                base.Delete(id);
            });
            return(Result <MetaObject> .Success());
        }