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

            n.Run();
        }
        static void Main(string[] args)
        {
            NationalParkCLI parkCLI = new NationalParkCLI();

            while (true)
            {
                parkCLI.RunCLI();
            }
        }
        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();
        }
        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();
        }
Example #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();
        }
Example #6
0
        static void Main(string[] args)
        {
            NationalParkCLI test = new NationalParkCLI();

            test.Run();
        }
        static void Main(string[] args)
        {
            NationalParkCLI cli = new NationalParkCLI();

            cli.run();
        }