public async Task <IActionResult> Edit(int id, [Bind("ID,Location,NickName,StadiumName,City,StateOrProvinceID,CountryID,BaseballDivisionID,BaseballLeagueID")] BaseballTeam baseballTeam)
        {
            if (id != baseballTeam.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _db.Update(baseballTeam);
                    await _db.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BaseballTeamExists(baseballTeam.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BaseballDivisionID"] = new SelectList(_db.BaseballDivisions, "ID", "Name", baseballTeam.BaseballDivisionID);
            ViewData["BaseballLeagueID"]   = new SelectList(_db.BaseballLeagues, "ID", "Name", baseballTeam.BaseballLeagueID);
            ViewData["CountryID"]          = new SelectList(_db.Country, "ID", "Name", baseballTeam.CountryID);
            ViewData["StateOrProvinceID"]  = new SelectList(_db.StateOrProvinces, "ID", "Name", baseballTeam.StateOrProvinceID);
            return(View(baseballTeam));
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var team = new BaseballTeam
            {
                [1]    = "Hosea Calibre",
                ["C"]  = "John Green",
                ["1B"] = "Bailey Matthews",
                ["2B"] = "Mookie Wilson",
                ["3B"] = "Louis Atavia",
                ["SS"] = "Rex Gatlin",
                ["RF"] = "Harvey White",
                ["CF"] = "Lou Gherig",
                ["LF"] = "Jordan Millan"
            };



            for (int i = 1; i <= 9; i++)
            {
                string position = team.GetPositionAbbreviation(i);

                Console.WriteLine(team[i] + " " + position);
            }

            Console.ReadKey();
        }
Ejemplo n.º 3
0
 public IEnumerable <BaseballGame> LoadScoresForTeam(DateTime date, BaseballTeam team)
 {
     foreach (BaseballGame game in LoadAllScores(date))
     {
         if (game.WinningTeamScore.Team.Key.Equals(team.Key) ||
             game.LosingTeamScore.Team.Key.Equals(team.Key))
         {
             yield return(game);
         }
     }
 }
Ejemplo n.º 4
0
        private String RespondToTVChannel(IBaseballSensor sensor, BaseballTeam team, DateTime time)
        {
            BaseballGame lastGame = null;

            foreach (BaseballGame game in sensor.LoadScoresForTeam(time, team))
            {
                List <String> possibleChannels = GetChannelsGameIsOn(sensor, game);
                lastGame = game;
                switch (game.State)
                {
                case GameState.NoGame:
                    return(String.Format("The {0} are not playing today.", team.Name));

                case GameState.GameHasntStarted:
                    if (!possibleChannels.Any())
                    {
                        return(String.Format("The {0} game will not be available on national TV.", team.Name));
                    }
                    else
                    {
                        return(String.Format("The {0} game will be available on {1} at {2}", team.Name, SayList(possibleChannels), game.StartingTime.ToShortTimeString()));
                    }

                case GameState.RainDelay:
                    if (!possibleChannels.Any())
                    {
                        return(String.Format("The {0} game is not available on national TV.", team.Name));
                    }
                    else
                    {
                        return(String.Format("The {0} game is currently in a rain delay, but is available on {1}", team.Name, SayList(possibleChannels)));
                    }

                case GameState.Started:
                    if (!possibleChannels.Any())
                    {
                        return(String.Format("The {0} game is not available on national TV.", team.Name));
                    }
                    else
                    {
                        return(String.Format("The {0} game is available on {1}.", team.Name, SayList(possibleChannels)));
                    }
                }
            }
            if (lastGame != null)
            {
                if (lastGame.State == GameState.Postponed)
                {
                    return(RespondForOneGame(lastGame, team));
                }
                return(String.Format("The game has already completed. {0}", RespondForOneGame(lastGame, team)));
            }
            return(String.Format("The {0} are not playing today.", team.Name));
        }
Ejemplo n.º 5
0
        public static void Main()
        {
            var team = new BaseballTeam
            {
                ["RF"] = "Mookie Betts",
                [4]    = "Jose Altuve",
                ["CF"] = "Mike Trout"
            };

            Console.WriteLine(team["2B"]);
        }
        public async Task <IActionResult> Create([Bind("ID,Location,NickName,StadiumName,City,StateOrProvinceID,CountryID,BaseballDivisionID,BaseballLeagueID")] BaseballTeam baseballTeam)
        {
            if (ModelState.IsValid)
            {
                _db.Add(baseballTeam);
                await _db.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BaseballDivisionID"] = new SelectList(_db.BaseballDivisions, "ID", "Name", baseballTeam.BaseballDivisionID);
            ViewData["BaseballLeagueID"]   = new SelectList(_db.BaseballLeagues, "ID", "Name", baseballTeam.BaseballLeagueID);
            ViewData["CountryID"]          = new SelectList(_db.Country, "ID", "Name", baseballTeam.CountryID);
            ViewData["StateOrProvinceID"]  = new SelectList(_db.StateOrProvinces, "ID", "Name", baseballTeam.StateOrProvinceID);
            return(View(baseballTeam));
        }
Ejemplo n.º 7
0
        public override string Speak()
        {
            Dialog        phrase    = CurrentDialog;
            SamiDateTime  time      = ParseTime(phrase.GetPropertyValue("Time"));
            String        teamName  = phrase.GetPropertyValue("Team");
            GameParameter parameter = (GameParameter)Enum.Parse(typeof(GameParameter), phrase.GetPropertyValue("Parameter"));

            ConversationIsOver = true;

            base.Speak();

            IBaseballSensor sensor = ConfigManager.FindAllComponentsOfType <IBaseballSensor>().FirstOrDefault(s => s.Teams.Any(t => t.Key.Equals(teamName)));

            if (sensor != null)
            {
                BaseballTeam team = sensor.Teams.Single(t => t.Key.Equals(teamName));

                switch (parameter)
                {
                case GameParameter.Score:
                    return(RespondForAllGames(sensor, time.Time, team));

                case GameParameter.Standings:
                    return(RespondToStandings(sensor, team));

                case GameParameter.MLBTVFreeGame:
                    return(RespondToMLBTVGame(sensor));

                case GameParameter.TVChannel:
                    return(RespondToTVChannel(sensor, team, time.Time));

                case GameParameter.TurnToGame:
                    return(RespondToTurnToGame(sensor, team, time.Time));

                default:
                    return(String.Empty);
                }
            }
            else if (parameter == GameParameter.MLBTVFreeGame)
            {
                sensor = ConfigManager.FindAllComponentsOfType <IBaseballSensor>().FirstOrDefault(s => s.League.Equals("MLB"));
                if (sensor != null)
                {
                    return(RespondToMLBTVGame(sensor));
                }
            }
            return(String.Empty);
        }
Ejemplo n.º 8
0
        private String RespondToStandings(IBaseballSensor sensor, BaseballTeam team)
        {
            BaseballStandings             standings = sensor.LoadStandings();
            BaseballTeamStanding          divisionStandings, wildcardStandings = null;
            BaseballStandingsWithWildcard fullStandings = standings as BaseballStandingsWithWildcard;

            bool gotStandingsSuccessful = false;

            if (fullStandings != null)
            {
                gotStandingsSuccessful = fullStandings.TryGetStandingsForTeam(team, out divisionStandings, out wildcardStandings);
            }
            else
            {
                gotStandingsSuccessful = standings.TryGetStandingsForTeam(team, out divisionStandings);
            }

            if (!gotStandingsSuccessful)
            {
                return(String.Format("I couldn't find any information about the {0} this year.", team.Name));
            }
            else if (divisionStandings.GamesBack == 0)
            {
                return(String.Format("The {0} lead the {1}.", team.Name, team.Division));
            }
            else if (wildcardStandings == null)
            {
                return(String.Format("The {0} are {1} games behind the leaders in the {2}.",
                                     team.Name, divisionStandings.GamesBack * -1, team.Division));
            }
            else if (wildcardStandings.GamesBack > 0)
            {
                return(String.Format("The {0} are {1} games behind the leaders in the {2}, and lead the wildcard standings by {3} games.",
                                     team.Name, divisionStandings.GamesBack * -1, team.Division, wildcardStandings.GamesBack));
            }
            else if (wildcardStandings.GamesBack == 0)
            {
                return(String.Format("The {0} are {1} games behind the leaders in the {2}, and just barely have a wildcard spot.",
                                     team.Name, divisionStandings.GamesBack * -1, team.Division));
            }
            else
            {
                return(String.Format("The {0} are {1} games behind the leaders in the {2}, and are {3} games behind in the wildcard standings.",
                                     team.Name, divisionStandings.GamesBack * -1, team.Division, wildcardStandings.GamesBack * -1));
            }
        }
Ejemplo n.º 9
0
        private String RespondForAllGames(IBaseballSensor sensor, DateTime time, BaseballTeam team)
        {
            IEnumerable <BaseballGame> scores = sensor.LoadScoresForTeam(time, team);

            if (!scores.Any())
            {
                return(String.Format("The {0} are not playing today.", team.Name));
            }
            if (scores.Count() == 1)
            {
                return(RespondForOneGame(scores.First(), team));
            }
            else if (scores.Count() == 2)
            {
                return("In the first game, " + RespondForOneGame(scores.First(), team) +
                       ". In the second game, " + RespondForOneGame(scores.Last(), team) + ".");
            }
            else
            {
                // We shouldn't have more than a doubleheader...
                return(String.Empty);
            }
        }
Ejemplo n.º 10
0
        private void UpdateDailyStandings()
        {
            XmlDocument  doc       = new XmlDocument();
            MLBStandings standings = new MLBStandings();
            DateTime     currDate  = DateTime.Now;

            while (DateTime.Now.Subtract(currDate).Days < 7)
            {
                currDate = currDate.Subtract(TimeSpan.FromDays(1));
                doc.Load(GetEpgFile(currDate));
                if (doc == null)
                {
                    break;
                }
                foreach (XmlElement game in doc.SelectNodes("/epg/game"))
                {
                    BaseballTeamStanding homeDivStanding      = new BaseballTeamStanding();
                    BaseballTeamStanding homeWildcardStanding = new BaseballTeamStanding();
                    String       homeTeamName = game.Attributes["home_team_name"].Value;
                    BaseballTeam homeTeam     = Teams.SingleOrDefault(t => t.Key.Equals(homeTeamName));
                    if (!standings.TryGetStandingsForTeam(homeTeam, out homeDivStanding, out homeWildcardStanding) &&
                        !String.IsNullOrEmpty(game.Attributes["home_games_back"].Value) &&
                        !String.IsNullOrEmpty(game.Attributes["home_games_back_wildcard"].Value))
                    {
                        homeDivStanding           = new BaseballTeamStanding();
                        homeWildcardStanding      = new BaseballTeamStanding();
                        homeDivStanding.Team      = homeTeam;
                        homeWildcardStanding.Team = homeTeam;

                        String gamesBack = game.Attributes["home_games_back"].Value;
                        if (gamesBack.Equals("-"))
                        {
                            homeDivStanding.GamesBack = 0;
                        }
                        else
                        {
                            homeDivStanding.GamesBack = -1 * Double.Parse(gamesBack);
                        }

                        gamesBack = game.Attributes["home_games_back_wildcard"].Value;
                        if (gamesBack.Equals("-"))
                        {
                            homeWildcardStanding.GamesBack = 0;
                        }
                        else if (gamesBack.StartsWith("+"))
                        {
                            homeWildcardStanding.GamesBack = Double.Parse(gamesBack);
                        }
                        else
                        {
                            homeWildcardStanding.GamesBack = -1 * Double.Parse(gamesBack);
                        }

                        standings.AddStandingsForTeam(homeDivStanding, homeWildcardStanding, (Teams.SingleOrDefault(t => t.Key.Equals(homeTeamName)) as MLBTeam).Division);
                    }

                    BaseballTeamStanding awayDivStanding      = new BaseballTeamStanding();
                    BaseballTeamStanding awayWildcardStanding = new BaseballTeamStanding();
                    String       awayTeamName = game.Attributes["away_team_name"].Value;
                    BaseballTeam awayTeam     = Teams.SingleOrDefault(t => t.Key.Equals(awayTeamName));
                    if (!standings.TryGetStandingsForTeam(awayTeam, out awayDivStanding, out awayWildcardStanding) &&
                        !String.IsNullOrEmpty(game.Attributes["away_games_back"].Value))
                    {
                        awayDivStanding           = new BaseballTeamStanding();
                        awayWildcardStanding      = new BaseballTeamStanding();
                        awayDivStanding.Team      = awayTeam;
                        awayWildcardStanding.Team = awayTeam;

                        String gamesBack = game.Attributes["away_games_back"].Value;
                        if (gamesBack.Equals("-"))
                        {
                            awayDivStanding.GamesBack = 0;
                        }
                        else
                        {
                            awayDivStanding.GamesBack = -1 * Double.Parse(gamesBack);
                        }

                        gamesBack = game.Attributes["away_games_back_wildcard"].Value;
                        if (gamesBack.Equals("-") || String.IsNullOrEmpty(gamesBack))
                        {
                            awayWildcardStanding.GamesBack = 0;
                        }
                        else if (gamesBack.StartsWith("+"))
                        {
                            awayWildcardStanding.GamesBack = Double.Parse(gamesBack);
                        }
                        else
                        {
                            awayWildcardStanding.GamesBack = -1 * Double.Parse(gamesBack);
                        }

                        standings.AddStandingsForTeam(awayDivStanding, awayWildcardStanding, (Teams.SingleOrDefault(t => t.Key.Equals(awayTeamName)) as MLBTeam).Division);
                    }
                }
            }
            _lastTimeStandingsUpdated = DateTime.Now;
            _dailyStandings           = standings;
        }
Ejemplo n.º 11
0
        private String RespondToTurnToGame(IBaseballSensor sensor, BaseballTeam team, DateTime time)
        {
            BaseballGame lastGame = null;

            foreach (BaseballGame game in sensor.LoadScoresForTeam(time, team))
            {
                List <String> possibleChannels = GetChannelsGameIsOn(sensor, game);
                lastGame = game;
                switch (game.State)
                {
                case GameState.NoGame:
                    return(String.Format("The {0} are not playing today.", team.Name));

                case GameState.GameHasntStarted:
                    if (possibleChannels.Any())
                    {
                        return(String.Format("The {0} will be playing at {1}.", team.Name, game.StartingTime.ToShortTimeString()));
                    }
                    else
                    {
                        return(String.Format("The {0} game will not be available on national TV.", team.Name));
                    }

                case GameState.RainDelay:
                    if (possibleChannels.Any())
                    {
                        return(String.Format("The {0} game is currently in a rain delay, but is available on ESPN.", team.Name));
                    }
                    else
                    {
                        return(String.Format("The {0} game is not available on national TV.", team.Name));
                    }

                case GameState.Started:
                    if (possibleChannels.Any() && _remotes.Any())
                    {
                        IEnumerable <String>    possibleRemoteNames = _remotes.Select(r => r.Name);
                        IEnumerable <ITVRemote> remotes             = ConfigManager.FindAllComponentsOfType <ITVRemote>();
                        foreach (ITVRemote remote in remotes)
                        {
                            if (possibleRemoteNames.Contains(remote.Name) &&
                                possibleChannels.Any(c => remote.GetChannels().Contains(c)))
                            {
                                Task.Run(() => remote.SendChannel(possibleChannels.First(c => remote.GetChannels().Contains(c))));
                            }
                        }
                        return("OK");
                    }
                    else if (possibleChannels.Any())
                    {
                        return(String.Format("There is no T V remote connected to me for me to use. The {0} game is on {1}.", team.Name, SayList(possibleChannels)));
                    }
                    else
                    {
                        return(String.Format("The {0} game is not on a national broadcast!", team.Name));
                    }

                case GameState.Postponed:
                case GameState.Completed:
                    break;
                }
            }
            if (lastGame != null)
            {
                if (lastGame.State == GameState.Postponed)
                {
                    return(RespondForOneGame(lastGame, team));
                }
                return(String.Format("The game has already completed. {0}", RespondForOneGame(lastGame, team)));
            }
            return(String.Format("The {0} are not playing today.", team.Name));
        }
Ejemplo n.º 12
0
        private String RespondForOneGame(BaseballGame score, BaseballTeam team)
        {
            String startingPhrase = String.Empty;

            switch (score.State)
            {
            case GameState.Started:
                if (score.WinningTeamScore.Score == score.LosingTeamScore.Score)
                {
                    if (score.WinningTeamScore.Team.Equals(team))
                    {
                        startingPhrase = String.Format("The {0} and the {1} are tied at {2} a piece. ", team.Name, score.LosingTeamScore.Team.Name, score.WinningTeamScore.Score);
                    }
                    else
                    {
                        startingPhrase = String.Format("The {0} and the {1} are tied at {2} a piece. ", team.Name, score.WinningTeamScore.Team.Name, score.WinningTeamScore.Score);
                    }
                }
                else if (score.WinningTeamScore.Team.Equals(team))
                {
                    startingPhrase = String.Format("The {0} are beating the {1} {2} to {3}. ", team.Name, score.LosingTeamScore.Team.Name, score.WinningTeamScore.Score, score.LosingTeamScore.Score);
                }
                else
                {
                    startingPhrase = String.Format("The {0} are losing to the {1} by a score of {2} to {3}. ", team.Name, score.WinningTeamScore.Team.Name, score.WinningTeamScore.Score, score.LosingTeamScore.Score);
                }

                String inningNum = SayOrdinal(score.InningNumber);
                if (score.TopOfInning)
                {
                    startingPhrase += String.Format("with {2} on and {0} outs in the top of the {1}.", score.NumberOfOuts, inningNum, score.NumberOnBase);
                }
                else
                {
                    startingPhrase += String.Format("with {2} on and {0} outs in the bottom of the {1}.", score.NumberOfOuts, inningNum, score.NumberOnBase);
                }
                break;

            case GameState.RainDelay:
                startingPhrase = String.Format("The {0} game is currently in a rain delay.", team.Name);
                break;

            case GameState.Postponed:
                startingPhrase = String.Format("The {0} game has been postponed.", team.Name);
                break;

            case GameState.NoGame:
                startingPhrase = String.Format("The {0} did not have a game that day.", team.Name);
                break;

            case GameState.GameHasntStarted:
                startingPhrase = String.Format("The {0} will be playing at {1}.", team.Name, score.StartingTime.ToShortTimeString());
                break;

            case GameState.Completed:
                if (score.WinningTeamScore.Team.Equals(team))
                {
                    startingPhrase = String.Format("The {0} beat the {1} by a score of {2} to {3}.", team.Name, score.LosingTeamScore.Team.Name, score.WinningTeamScore.Score, score.LosingTeamScore.Score);
                }
                else
                {
                    startingPhrase = String.Format("The {0} lost to the {1} by a score of {2} to {3}.", team.Name, score.WinningTeamScore.Team.Name, score.WinningTeamScore.Score, score.LosingTeamScore.Score);
                }
                break;
            }
            return(startingPhrase);
        }
Ejemplo n.º 13
0
        public async static Task GetData(ApplicationDbContext _db)
        {
            // Country
            int countryUnitedStatesID = (await _db.Country.FirstOrDefaultAsync(x => x.Name == "United States")).ID;
            int countryCanadaID       = (await _db.Country.FirstOrDefaultAsync(x => x.Name == "Canada")).ID;

            // States
            int stateTexasID         = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Texas")).ID;
            int stateCaliforniaID    = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "California")).ID;
            int stateWashingtonID    = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Washington")).ID;
            int stateMassachusettsID = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Massachusetts")).ID;
            int stateNewYorkID       = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "New York")).ID;
            int stateMarylandID      = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Maryland")).ID;
            int stateFloridaID       = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Florida")).ID;
            int stateIllinoisID      = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Illinois")).ID;
            int stateOhioID          = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Ohio")).ID;
            int stateMichiganID      = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Michigan")).ID;
            int stateMissouriID      = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Missouri")).ID;
            int stateMinnesotaID     = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Minnesota")).ID;
            int statePennsylvaniaID  = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Pennsylvania")).ID;
            int stateGeorgiaID       = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Georgia")).ID;
            int stateWisconsinID     = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Georgia")).ID;
            int stateArizonaID       = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Arizona")).ID;
            int stateColoradoID      = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Colorado")).ID;
            int stateWashingtonDcID  = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "District of Columbia")).ID;
            int stateOntarioID       = (await _db.StateOrProvinces.FirstOrDefaultAsync(x => x.Name == "Ontario (CA)")).ID;

            // Baseball Division
            int divisionAmericanLeagueEastID    = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "American League East")).ID;
            int divisionAmericanLeagueCentralID = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "American League Central")).ID;
            int divisionAmericanLeagueWestID    = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "American League West")).ID;
            int divisionNationalLeagueEastID    = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "National League East")).ID;
            int divisionNationalLeagueCentralID = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "National League Central")).ID;
            int divisionNationalLeagueWestID    = (await _db.BaseballDivisions.FirstOrDefaultAsync(x => x.Name == "National League East")).ID;

            // Baseball League
            int leagueAmericanID = (await _db.BaseballLeagues.FirstOrDefaultAsync(x => x.Name == "American League")).ID;
            int leagueNationalID = (await _db.BaseballLeagues.FirstOrDefaultAsync(x => x.Name == "National League")).ID;

            var baseballTeams = new BaseballTeam[]
            {
                // American East
                new BaseballTeam {
                    Location = "Boston", NickName = "Red Sox", StadiumName = "Fenway Park", City = "Boston", TeamLogoImagePath = "/images/defaultTeamLogo/red_sox.png", StateOrProvinceID = stateMassachusettsID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueEastID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "New York", NickName = "Yankees", StadiumName = "Yankee Stadium", City = "New York", TeamLogoImagePath = "/images/defaultTeamLogo/yankees.png", StateOrProvinceID = stateNewYorkID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueEastID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Baltimore", NickName = "Orioles", StadiumName = "Oriole Park at Camden Yards", TeamLogoImagePath = "/images/defaultTeamLogo/orioles.png", City = "Baltimore", StateOrProvinceID = stateMarylandID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueEastID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Tampa Bay", NickName = "Rays", StadiumName = "Tropicana Field", City = "Tampa Bay", TeamLogoImagePath = "/images/defaultTeamLogo/rays.png", StateOrProvinceID = stateFloridaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueEastID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Toronto", NickName = "Blue Jays", StadiumName = "Rogers Centre", City = "Toronto", TeamLogoImagePath = "/images/defaultTeamLogo/blue_jays.png", StateOrProvinceID = stateOntarioID, CountryID = countryCanadaID, BaseballDivisionID = divisionAmericanLeagueEastID, BaseballLeagueID = leagueAmericanID
                },

                // American Central
                new BaseballTeam {
                    Location = "Chicago", NickName = "White Sox", StadiumName = "Guaranteed Rate Field", City = "Chicago", TeamLogoImagePath = "/images/defaultTeamLogo/white_sox.png", StateOrProvinceID = stateIllinoisID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueCentralID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Cleveland", NickName = "Indians", StadiumName = "Progressive Field", City = "Ohio", TeamLogoImagePath = "/images/defaultTeamLogo/indians.png", StateOrProvinceID = stateOhioID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueCentralID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Detroit", NickName = "Tigers", StadiumName = "Comerica Park", City = "Detroit", TeamLogoImagePath = "/images/defaultTeamLogo/tigers.png", StateOrProvinceID = stateMichiganID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueCentralID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Kansas City", NickName = "Royals", StadiumName = "Kauffman Stadium", City = "Kansas City", TeamLogoImagePath = "/images/defaultTeamLogo/royals.png", StateOrProvinceID = stateMissouriID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueCentralID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Minnesota", NickName = "Twins", StadiumName = "Target Field", City = "Minneapolis", TeamLogoImagePath = "/images/defaultTeamLogo/twins.png", StateOrProvinceID = stateMinnesotaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueCentralID, BaseballLeagueID = leagueAmericanID
                },


                // American West
                new BaseballTeam {
                    Location = "Houston", NickName = "Astros", StadiumName = "Minute Maid Park", City = "Houston", TeamLogoImagePath = "/images/defaultTeamLogo/astros.png", StateOrProvinceID = stateTexasID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueWestID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Texas", NickName = "Rangers", StadiumName = "Globe Life Field", City = "Dallas", TeamLogoImagePath = "/images/defaultTeamLogo/rangers.png", StateOrProvinceID = stateTexasID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueWestID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Los Angeles", NickName = "Angels", StadiumName = "Angel Stadium", City = "Los Angeles", TeamLogoImagePath = "/images/defaultTeamLogo/angels.png", StateOrProvinceID = stateCaliforniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueWestID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Oakland", NickName = "Athletics", StadiumName = "RingCentral Coliseum", City = "Oakland", TeamLogoImagePath = "/images/defaultTeamLogo/athletics.png", StateOrProvinceID = stateCaliforniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueWestID, BaseballLeagueID = leagueAmericanID
                },
                new BaseballTeam {
                    Location = "Seattle", NickName = "Mariners", StadiumName = "T-Mobile Park", City = "Seattle", TeamLogoImagePath = "/images/defaultTeamLogo/mariners.png", StateOrProvinceID = stateWashingtonID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionAmericanLeagueWestID, BaseballLeagueID = leagueAmericanID
                },

                // National East
                new BaseballTeam {
                    Location = "New York", NickName = "Mets", StadiumName = "Citi Field", City = "New York", TeamLogoImagePath = "/images/defaultTeamLogo/mets.png", StateOrProvinceID = stateNewYorkID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueEastID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Miami", NickName = "Marlins", StadiumName = "LoanDepot Park", City = "Miami", TeamLogoImagePath = "/images/defaultTeamLogo/marlins.png", StateOrProvinceID = stateFloridaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueEastID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Philadephia", NickName = "Phillies", StadiumName = "Citizens Bank Park", City = "Philadelphia", TeamLogoImagePath = "/images/defaultTeamLogo/phillies.png", StateOrProvinceID = statePennsylvaniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueEastID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Washington", NickName = "Nationals", StadiumName = "Nationals Park", City = "Washington", TeamLogoImagePath = "/images/defaultTeamLogo/nationals.png", StateOrProvinceID = stateWashingtonDcID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueEastID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Atlanta", NickName = "Braves", StadiumName = "Truist Park", City = "Atlanta", TeamLogoImagePath = "/images/defaultTeamLogo/braves.png", StateOrProvinceID = stateGeorgiaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueEastID, BaseballLeagueID = leagueNationalID
                },

                // National Central
                new BaseballTeam {
                    Location = "Cincinnati", NickName = "Reds", StadiumName = "Great American Ball Park", City = "Cincinnati", TeamLogoImagePath = "/images/defaultTeamLogo/reds.png", StateOrProvinceID = stateOhioID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueCentralID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Milwaukee", NickName = "Brewers", StadiumName = "American Family Field", City = "Milwaukee", TeamLogoImagePath = "/images/defaultTeamLogo/brewers.png", StateOrProvinceID = stateWisconsinID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueCentralID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "St. Louis", NickName = "Cardinals", StadiumName = "Busch Stadium", City = "St. Louis", TeamLogoImagePath = "/images/defaultTeamLogo/cardinals.png", StateOrProvinceID = stateMissouriID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueCentralID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Chicago", NickName = "Cubs", StadiumName = "Wrigley Field", City = "Chicago", TeamLogoImagePath = "/images/defaultTeamLogo/cubs.png", StateOrProvinceID = stateIllinoisID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueCentralID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Pittsburgh", NickName = "Pirates", StadiumName = "PNC Park", City = "Pittsburgh", TeamLogoImagePath = "/images/defaultTeamLogo/pirates.png", StateOrProvinceID = statePennsylvaniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueCentralID, BaseballLeagueID = leagueNationalID
                },

                // National West
                new BaseballTeam {
                    Location = "Los Angeles", NickName = "Dodgers", StadiumName = "Dodger Stadium", City = "Los Angeles", TeamLogoImagePath = "/images/defaultTeamLogo/dodgers.png", StateOrProvinceID = stateCaliforniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueWestID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "San Francisco", NickName = "Giants", StadiumName = "Oracle Park", City = "San Francisco", TeamLogoImagePath = "/images/defaultTeamLogo/giants.png", StateOrProvinceID = stateCaliforniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueWestID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "San Diego", NickName = "Padres", StadiumName = "Petco Park", City = "San Diego", TeamLogoImagePath = "/images/defaultTeamLogo/padres.png", StateOrProvinceID = stateCaliforniaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueWestID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Arizona", NickName = "Diamondbacks", StadiumName = "Chase Field", City = "Phoenix", TeamLogoImagePath = "/images/defaultTeamLogo/diamondbacks.png", StateOrProvinceID = stateArizonaID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueWestID, BaseballLeagueID = leagueNationalID
                },
                new BaseballTeam {
                    Location = "Colorado", NickName = "Rockies", StadiumName = "Coors Field", City = "Denver", TeamLogoImagePath = "/images/defaultTeamLogo/rockies.png", StateOrProvinceID = stateColoradoID, CountryID = countryUnitedStatesID, BaseballDivisionID = divisionNationalLeagueWestID, BaseballLeagueID = leagueNationalID
                },
            };

            _db.BaseballTeam.AddRange(baseballTeams);
            _db.SaveChanges();
        }