Пример #1
0
        public static Player insert(string name, int gamesPlayed, int gamesWon, int kills, int deaths, int assists, int idTeam) {
            try{
                var context = new CurseDBDataContext();
                var player = new Player() {
                    name = name,
                    games_played = gamesPlayed,
                    games_won = gamesWon,
                    kills = kills,
                    deaths = deaths,
                    assists = assists,
                    id_team = idTeam
                };

                context.Players.InsertOnSubmit(player);
                context.SubmitChanges();

                return player;
            }catch(Exception ex){
                throw ex;
            }
        }
Пример #2
0
		private void detach_Players(Player entity)
		{
			this.SendPropertyChanging();
			entity.Team = null;
		}
Пример #3
0
		private void attach_Players(Player entity)
		{
			this.SendPropertyChanging();
			entity.Team = this;
		}