예제 #1
0
 public void Delete(Goal goal)
 {
     db.Goals.DeleteOnSubmit(goal);
 }
예제 #2
0
		private void detach_Goals1(Goal entity)
		{
			this.SendPropertyChanging();
			entity.Player1 = null;
		}
예제 #3
0
 //Insert/Delete/Update
 public void Add(Goal goal)
 {
     db.Goals.InsertOnSubmit(goal);
 }
예제 #4
0
		private void detach_Goals(Goal entity)
		{
			this.SendPropertyChanging();
			entity.Game = null;
		}
예제 #5
0
		private void attach_Goals1(Goal entity)
		{
			this.SendPropertyChanging();
			entity.Player1 = this;
		}
예제 #6
0
		private void attach_Goals(Goal entity)
		{
			this.SendPropertyChanging();
			entity.Game = this;
		}
예제 #7
0
 partial void DeleteGoal(Goal instance);
예제 #8
0
 partial void UpdateGoal(Goal instance);
예제 #9
0
 partial void InsertGoal(Goal instance);
예제 #10
0
        public string ScoreGoal(int scorer, int position, int team, int gameID, int oppDefID, int selfGoal)
        {
            var score = new Goal
            {
                PlayerID = scorer,
                Position = position,
                GoalDate = DateTime.Now,
                Team = team,
                GameID = gameID,
                OppDefenseID = oppDefID,
                SelfGoal = selfGoal
            };

            goalRep.Add(score);
            goalRep.Save();

            return string.Format("{0}", score.ID);
        }