Exemple #1
0
        private static void GenerateFunctions()
        {
            string fileExt = FileExtension.DOT_CS;

            string[] functions = Db.Service.GetFunctionNameList();
            string   outDir    = GetOutSubDir("Functions");

            foreach (string tbl in functions)
            {
                string   n         = Regex.Split(tbl, @"\.")[1];
                string   className = Db.Service.GetSchema(n, TableType.Function).ClassName;
                Template tt        = CodeService.BuildViewTemplate(n);
                tt.OutputPath = Path.Combine(outDir, className + fileExt);
                compiler.AddTemplate(tt);
            }
        }
Exemple #2
0
        private static void GenerateViews()
        {
            string fileExt = FileExtension.DOT_CS;


            //get the view list
            string[] views  = Db.Service.GetViewNameList();
            string   outDir = GetOutSubDir("Views");

            foreach (string tbl in views)
            {
                string   className = Db.Service.GetSchema(tbl, TableType.View).ClassName;
                Template tt        = CodeService.BuildViewTemplate(tbl);
                tt.OutputPath = Path.Combine(outDir, className + fileExt);
                compiler.AddTemplate(tt);
            }
        }