Пример #1
0
 public List <T002_Player> getPlayersByTeamId(int id)
 {
     using (var dbc = new Domain.TeamDBEntities())
     {
         return(dbc.T002_Player.Where(teamPlayer => teamPlayer.TeamId == id).ToList());
     }
 }
Пример #2
0
 public int GetTeamIdByTeamName(string name)
 {
     using (var dbc = new Domain.TeamDBEntities())
     {
         return(dbc.T001_Teams.Where(team => team.Name == name).First().Id);
     }
 }
Пример #3
0
 public string getTeamNameById(int id)
 {
     using (var dbc = new Domain.TeamDBEntities())
     {
         return(getTeams().Where(team => team.Id == id).First().Name);
     }
 }