Example #1
0
        public static void AddTeamPlayers()
        {
            var context = new GamepediaContext();

            var player = context.Players.Find(2);
            var team   = context.Teams.Find(2);

            context.Add(new TeamPlayer {
                Team = team, Player = player
            });
            context.SaveChanges();
        }
Example #2
0
        public static void AddTournamentMap()
        {
            var context = new GamepediaContext();

            var map        = context.Maps.Find(5);
            var tournament = context.Tournaments.Find(5);

            context.Add(new TournamentMap {
                Map = map, Tournament = tournament
            });
            context.SaveChanges();
        }