internal static void ConvertDatabase()
 {
     if (Program.SavedConnection == null)
     {
         Program.SavedConnection = new SavedConnection {
             Database = Program.Database,
             Host     = Program.Ip,
             Password = Program.Password,
             Username = Program.User,
         }
     }
     ;
     DiagramHandlers.GenerateSchema(Program.SavedConnection, Program.SavedConnection.Database, Program.SavedConnection.FilePath);
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            for (int i = 0; i < args.Length; i++)
            {
                switch (args[i])
                {
                case "-u":
                    User = args[i + 1];
                    break;

                case "-password":
                    Password = args[i + 1];
                    break;

                case "-d":
                    Database = args[i + 1];
                    break;

                case "-file":
                    FilePath = args[i + 1];
                    break;

                case "-a":
                    Ip = args[i + 1];
                    break;

                case "-e":
                    EditConnection();
                    break;

                case "-r":
                    RemoveConnection();
                    break;

                case "-s":
                    SaveDatabaseGen();
                    break;

                case "-L":
                    GetConnections();
                    break;

                case "-CP":
                    DbContextPath = args[i + 1];
                    break;

                case "-Context":
                    GenerateDbContext();
                    break;

                case "-Connection":
                    SavedConnection = GetConnectionById(args[i + 1]);
                    System.Console.WriteLine(SavedConnection.ConnectionString);
                    break;

                case "-GS":
                    DiagramHandlers.GenerateSchema(SavedConnection, SavedConnection.Database, SavedConnection.FilePath);
                    break;

                case "-GF":
                    DiagramHandlers.GenerateSchema(SavedConnection, Database, FilePath);
                    break;

                case "--Help":
                    ShowHelpMenu();
                    break;
                }
            }
            if (args.Length == 0)
            {
                System.Console.WriteLine("Use rokono-cl --Help  *for more information*");
            }
        }