public void UpdateRating(Team team) { IEnumerable<Player> players; using (var playerRepository = new RepositoryFactory().CreatePlayerRepository()) { players = playerRepository.GetPlayersByTeam(team, false); } UpdateRating(team, players); }
public IEnumerable<Player> GetByTeam(Team team) { using (var playerRepository = new RepositoryFactory().CreatePlayerRepository()) { var players = playerRepository.GetPlayersByTeam(team); return players; } }