partial void UpdateMatchmedia(Matchmedia instance);
 partial void DeleteMatchmedia(Matchmedia instance);
 partial void InsertMatchmedia(Matchmedia instance);
		private void detach_Matchmedia(Matchmedia entity)
		{
			this.SendPropertyChanging();
			entity.Player = null;
		}
		private void attach_Matchmedia(Matchmedia entity)
		{
			this.SendPropertyChanging();
			entity.Player = this;
		}
		private void detach_Matchmedia(Matchmedia entity)
		{
			this.SendPropertyChanging();
			entity.MatchSession = null;
		}
        private void RefreshMatchmediaView()
        {
            var matchSessionsPlayers = GetSelectedPlayers();
            primaryPlayer = matchSessionsPlayers.Item2 != null ? matchSessionsPlayers.Item2.Original : null;
            var changedPrimaryPlayer = matchSessionsPlayers.Item2 != null ? matchSessionsPlayers.Item2.Copy : null;
            primaryPlayerLabel.Text = changedPrimaryPlayer == null
                                          ? "None"
                                          : string.Format("{0} ({1})", changedPrimaryPlayer.Player.Name, changedPrimaryPlayer.Player.MyId);

            IEnumerable<Matchmedia> media = new Matchmedia[0];
            media = 
                matchSessionsPlayers.Item1
                    .Aggregate(media, (current, selectedPlayer) =>
                        current.Union(from copy in matchmediaDataCopy.CopyLinqData
                                      let orig = matchmediaDataCopy.get_CopyItemToOriginal(copy)
                                      where orig.MatchSessions_Player == selectedPlayer.Original
                                      select copy));

            var value = matchmediaDataCopy.GetCopiedTableFromCopyData(media);
            value.InitRow += value_InitRow;
            value.UserAddedRow += value_UserAddedRow;

            SetNewWrapper(value);
        }