Esempio n. 1
0
 private static void GenerateTableScript(ScriptFacade f, string tbl)
 {
     try
       {
     Console.WriteLine(string.Format("The table '{0}' gen started.", tbl));
     var script = f.GenerateTableDataScript(tbl);
     var file = string.Concat(Path.Combine(GenScriptsPath, tbl), ScriptExtension);
     File.WriteAllText(file, script);
     Console.WriteLine(string.Format("The table '{0}' gen finished.", tbl));
       }
       catch (Exception e)
       {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(string.Format("The table '{0}' gen failed.", tbl));
     Console.ResetColor();
     Logger.Write(string.Concat(e.Message, Environment.NewLine, e.StackTrace));
       }
 }