示例#1
0
 public void add_player(string nname, string fname, string lname, string email, string phone)
 {
     DatabaseContext.Player newPlayer = new DatabaseContext.Player {
         NickName = nname, FirstName = fname, LastName = lname, EmailAddress = email, PhoneNumber = phone
     };
     db.Players.InsertOnSubmit(newPlayer);
     db.SubmitChanges();
     players.Add(new PlayerViewModel(newPlayer));
     NotifyPropertyChanged("players");
 }
 public PlayerViewModel(DatabaseContext.Player player)
 {
     this.player = player;
     db          = App.DB;
 }