public void addUser(User u) { gameEntities3 db = new gameEntities3(); db.User.Add(u); db.SaveChanges(); }
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); }
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); }
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); }