예제 #1
0
 partial void DeleteTEAM(TEAM instance);
예제 #2
0
 partial void InsertTEAM(TEAM instance);
예제 #3
0
 partial void UpdateTEAM(TEAM instance);
예제 #4
0
파일: MlbCom.cs 프로젝트: ssickles/archive
        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;
        }