コード例 #1
0
        static void Main(string[] args)
        {
            string          connectionString = ConfigurationManager.ConnectionStrings["CapstoneDatabase"].ConnectionString;
            NationalParkCLI n = new NationalParkCLI(connectionString);

            n.Run();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            NationalParkCLI parkCLI = new NationalParkCLI();

            while (true)
            {
                parkCLI.RunCLI();
            }
        }
コード例 #3
0
        static void Main(string[] args)
        {
            // Sample Code to get a connection string from the
            // App.Config file
            // Use this so that you don't need to copy your connection string all over your code!
            string          connectionString = ConfigurationManager.ConnectionStrings["CapstoneDatabase"].ConnectionString;
            NationalParkCLI mainMenu         = new NationalParkCLI();

            mainMenu.PrintMenu();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(150, 40);
            // Sample Code to get a connection string from the
            // App.Config file
            // Use this so that you don't need to copy your connection string all over your code!
            string          connectionString = ConfigurationManager.ConnectionStrings["CapstoneDatabase"].ConnectionString;
            NationalParkCLI cli = new NationalParkCLI();

            cli.RunCLI();
        }
コード例 #5
0
        static void Main(string[] args)
        {
            // Get the connection string from the appsettings.json file
            IConfigurationBuilder builder = new ConfigurationBuilder()
                                            .SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            string connectionString = configuration.GetConnectionString("NationalParksConnection");

            IParkDAO        parkDAO        = new ParkDAO(connectionString);
            IReservationDAO reservationDAO = new ReservationDAO(connectionString);
            ICampgroundDAO  campgroundDAO  = new CampgroundDAO(connectionString);

            NationalParkCLI application = new NationalParkCLI(parkDAO, reservationDAO, campgroundDAO);

            application.RunCLI();
        }
コード例 #6
0
        static void Main(string[] args)
        {
            NationalParkCLI test = new NationalParkCLI();

            test.Run();
        }
コード例 #7
0
        static void Main(string[] args)
        {
            NationalParkCLI cli = new NationalParkCLI();

            cli.run();
        }