Exemplo n.º 1
0
        public static TreeNode GenCode(List <Table> pTables)
        {
            List <GeneratedCode> wGeneratedCodeResult = new List <GeneratedCode>();
            GeneratedCode        wGeneratedCode;

            foreach (Table t in pTables)
            {
                wGeneratedCode    = new GeneratedCode();
                wGeneratedCode.Id = t.Name;
                wGeneratedCode.Code.Append(GenEntity.Generate(t, FwkGeneratorHelper.TemplateSetting.Project.ProjectName));
                wGeneratedCodeResult.Add(wGeneratedCode);
            }


            return(BuildTreeNode(wGeneratedCodeResult));
        }
Exemplo n.º 2
0
        public static TreeNode GenCode(List <Microsoft.SqlServer.Management.Smo.View> pViews)
        {
            List <GeneratedCode> wGeneratedCodeResult = new List <GeneratedCode>();
            GeneratedCode        wGeneratedCode;

            foreach (Microsoft.SqlServer.Management.Smo.View t in pViews)
            {
                wGeneratedCode    = new GeneratedCode();
                wGeneratedCode.Id = t.Name;
                wGeneratedCode.Code.Append(GenEntity.Generate(t, FwkGeneratorHelper.TemplateSetting.Project.ProjectName));
                wGeneratedCodeResult.Add(wGeneratedCode);
            }


            return(BuildTreeNode(wGeneratedCodeResult));
        }