Example #1
0
        public void addUser(User u)
        {
            gameEntities3 db = new gameEntities3();

            db.User.Add(u);
            db.SaveChanges();
        }
Example #2
0
        public List <User> getUsernames()
        {
            gameEntities3 db  = new gameEntities3();
            var           rez = from item in db.User.AsEnumerable()
                                select item;

            List <User> users = rez.ToList();

            return(users);
        }
Example #3
0
        public List <ShooterGame> getShooterRecordData()
        {
            gameEntities3 db  = new gameEntities3();
            var           rez = from item in db.ShooterGame.AsEnumerable()
                                orderby item.score descending
                                select item;

            List <ShooterGame> scores = rez.ToList();

            return(scores);
        }
Example #4
0
        public List <ShooterGame> getShooterScoreData(int id)
        {
            gameEntities3 db  = new gameEntities3();
            var           rez = from item in db.ShooterGame.AsEnumerable()
                                where item.ID_user == id
                                orderby item.score descending
                                select item;

            List <ShooterGame> scores = rez.ToList();

            return(scores);
        }