public List <T002_Player> getPlayersByTeamId(int id) { using (var dbc = new Domain.TeamDBEntities()) { return(dbc.T002_Player.Where(teamPlayer => teamPlayer.TeamId == id).ToList()); } }
public int GetTeamIdByTeamName(string name) { using (var dbc = new Domain.TeamDBEntities()) { return(dbc.T001_Teams.Where(team => team.Name == name).First().Id); } }
public string getTeamNameById(int id) { using (var dbc = new Domain.TeamDBEntities()) { return(getTeams().Where(team => team.Id == id).First().Name); } }