Exemplo n.º 1
0
        private static async Task ImportApp(DesignHub ctx, AppPackage pkg)
        {
            //TODO:暂重用更新逻辑简单实现
            //先创建应用,必须添加到设计树内,因保存实体模型时获取表名需要用到
            var appRootNode = ctx.DesignTree.AppRootNode;
            var appNode     = new ApplicationNode(ctx.DesignTree, pkg.Application);

            appRootNode.Nodes.Add(appNode);
            await ModelStore.CreateApplicationAsync(pkg.Application);

            await UpdateApp(ctx, pkg, pkg.Application);
        }