public IEnumerable <Pairing> GetListPairingInTourRound(int roundID, int tourID) { var pairings = _pairingRepository.GetListPairingInTourRound(roundID, tourID); foreach (var pair in pairings) { pair.PlayerInPairs = _playerInPairRepository.GetListPlayerInParing(pair.PairingID); } return(pairings); }
public IEnumerable <Round> GetAllRoundPairingInTournament(int id) { var rounds = _roundRepository.GetListRoundByTournament(id); foreach (var round in rounds) { round.Pairings = _pairingRepository.GetListPairingInTourRound(round.ID, id); foreach (var pair in round.Pairings) { pair.PlayerInPairs = _playerInPairRepository.GetListPlayerInParing(pair.PairingID); } } return(rounds); }
public IEnumerable <PlayerInPair> GetListPlayerInParing(int pairingID) { return(_playerInPairRepository.GetListPlayerInParing(pairingID)); }