public void Delete(Goal goal) { db.Goals.DeleteOnSubmit(goal); }
private void detach_Goals1(Goal entity) { this.SendPropertyChanging(); entity.Player1 = null; }
//Insert/Delete/Update public void Add(Goal goal) { db.Goals.InsertOnSubmit(goal); }
private void detach_Goals(Goal entity) { this.SendPropertyChanging(); entity.Game = null; }
private void attach_Goals1(Goal entity) { this.SendPropertyChanging(); entity.Player1 = this; }
private void attach_Goals(Goal entity) { this.SendPropertyChanging(); entity.Game = this; }
partial void DeleteGoal(Goal instance);
partial void UpdateGoal(Goal instance);
partial void InsertGoal(Goal instance);
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); }