private static void JoinClubAndTournament() { var ctJoin = new ClubTournament { ClubId = 1, TournamentId = 2 }; _context.AddRange(ctJoin); _context.SaveChanges(); }
public static void InsertClubWithStadium() { var club = new Club { ClubName = "Liverpool", City = "Liverpool", Founded = new DateTime(1892, 6, 3) }; var stadium = new Stadium { StadiumName = "Anfield", Capacity = 54074, ClubId = 7 }; _context.AddRange(club, stadium); _context.SaveChanges(); }