static void Main(string[] args)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["CapstoneDatabase"].ConnectionString;

            NationalParkCLI cli = new NationalParkCLI(connectionString);

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

            while (true)
            {
                parkCLI.RunCLI();
            }
        }
Exemple #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 output = new NationalParkCLI();

            output.RunCLI();
        }
        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();
        }
Exemple #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();
        }