private void btnCreateTeam_Click(object sender, EventArgs e) { TeamModel t = new TeamModel(); t.TeamName = txtTeamName.Text; t.TeamMembers = selectedTeamMembers; IDataConnection tournamentRepo = SqlFactory.CreateTournamentRepo(); tournamentRepo.CreateTeam(t); //GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); }