partial void DeleteTEAM(TEAM instance);
partial void InsertTEAM(TEAM instance);
partial void UpdateTEAM(TEAM instance);
private TEAM GetTeam(string TeamName) { TEAM team = (from t in mlbData.TEAMs where t.City + " " + t.Nickname == TeamName select t).SingleOrDefault(); if (team == null) { //add team team = new TEAM(); string[] teamParts = TeamName.Split(' '); team.City = teamParts[0]; for (int i = 1; i < teamParts.Length; i++) { team.Nickname += teamParts[i]; } team.Franchise = 31; team.Division = 1; team.YearStarted = 2000; team.YearEnded = 2000; mlbData.TEAMs.InsertOnSubmit(team); mlbData.SubmitChanges(); } return team; }