Example #1
0
        static void Main(string[] args)
        {
            DbCommands.InitializeDB(forceReset: false);

            Console.WriteLine("명령어를 입력하세여");
            Console.WriteLine("[0] Force Reset");
            Console.WriteLine("[1] ShowItems");
            Console.WriteLine("[2] Test");

            while (true)
            {
                Console.WriteLine("> ");
                string command = Console.ReadLine();

                switch (command)
                {
                case "0":
                    DbCommands.InitializeDB(true);
                    break;

                case "1":
                    DbCommands.ShowItems();
                    break;

                case "2":
                    DbCommands.Test();
                    break;

                case "3":
                    break;
                }
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            DbCommands.InitializeDB(forceReset: false);

            // CRUD
            Console.WriteLine("명령어를 입력하세요");
            Console.WriteLine("[0] Force reset");
            Console.WriteLine("[1] Show items");
            Console.WriteLine("[2] Test");

            while (true)
            {
                Console.Write("> ");
                string command = Console.ReadLine().ToLower();
                switch (command)
                {
                case "0":
                    DbCommands.InitializeDB(forceReset: true);
                    break;

                case "1":
                    DbCommands.ShowItems();
                    break;

                case "2":
                    DbCommands.Test();
                    break;

                case "3":
                    break;

                case "exit":
                    Environment.Exit(0);
                    break;
                }
            }
        }