Example #1
0
        public void SqlTesting()
        {
            AutoTable2 autoTable2 = new AutoTable2();

            autoTable2.MakeTable <Player_Table>();

            Player_TableFac player_TableFac = new Player_TableFac();

            Player_Table player01 = new Player_Table(19, 41);

            player_TableFac.Insert(player01);

            Console.WriteLine(player_TableFac.Get(1).MaxHealth);

            List <Player_Table> players = new List <Player_Table>();

            players = player_TableFac.GetAll();
            foreach (Player_Table item in players)
            {
                Console.WriteLine("ID: " + item.ID);
                Console.WriteLine("MaxHealth: " + item.MaxHealth);
                Console.WriteLine("MoveSpeed: " + item.MoveSpeed);
                Console.WriteLine();
            }

            Player_Table playerUpdate = new Player_Table(9999, 9999);

            playerUpdate.ID = 1;
            player_TableFac.Update(playerUpdate);
        }
Example #2
0
        private void Stats()
        {
            AutoTable <Player_Table> autoTable = new AutoTable <Player_Table>();

            autoTable.MakeTable();

            Player_TableFac pf = new Player_TableFac();

            Player_Table pt = new Player_Table(100, 250);

            pf.Insert(pt);

            List <Player_Table> Listpt = pf.GetAll();

            foreach (Player_Table item in Listpt)
            {
                Console.WriteLine(item.MoveSpeed);
                Console.WriteLine(item.MaxHealth);
            }
        }