Example #1
0

        
Example #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //configuration Manager exposes thing from configuration file
            var connString = ConfigurationManager.ConnectionStrings["database"];

            _games = new SqlGameDatabase(connString.ConnectionString);

            ////Seed if database is empty // commented out after seeded db
            //var games = _games.GetAll();
            //if (games.Count() == 0)
            //    //SeedDatabase.Seed(_games);
            //    _games.Seed();

            BindList();
        }
Example #3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // Load connection string from config
            var connString = ConfigurationManager.connectionString["database"];

            _games = new SqlGameDatabase();

            //Seed if database is empty
            var games = _games.GetAll();

            //if (games.Count() == 0)
            //    //SeedDatabase.Seed(_games);
            //    _games.Seed();

            BindList();
        }