partial void DeleteInti_PointEvent(Inti_PointEvent instance);
 partial void UpdateInti_PointEvent(Inti_PointEvent instance);
		private void detach_Inti_PointEvent(Inti_PointEvent entity)
		{
			this.SendPropertyChanging();
			entity.Inti_Tournament = null;
		}
 partial void InsertInti_PointEvent(Inti_PointEvent instance);
        private void AddMatchPointEvent(IntiDataContext db, Inti_Match match, Inti_AthleteClub athleteClub, Inti_PointEvent pointEvent, int nmbrOfEvents)
        {
            for(var i=1;i<= nmbrOfEvents;i++)
            {
                var mpe = new Inti_MatchPointEvent();
                mpe.MatchGUID = match.GUID;
                mpe.AthleteClubGUID = athleteClub.GUID;
                mpe.PointEventGUID = pointEvent.GUID;

                mpe.Points =
                    pointEvent.Inti_PointEventPosition.Where(
                        pep => pep.PositionGUID == athleteClub.PositionGUID).ToList()[0].Points;

                if (match.TourDay == 19 || match.TourDay == 38)
                {
                    //dubbla poäng
                    mpe.Points = mpe.Points * 2;
                }

                db.Inti_MatchPointEvent.InsertOnSubmit(mpe);
            }
        }