예제 #1
0
        public IList <ParticipantDTO> CautaParticipantiByProba(int idPr)
        {
            Proba proba = probaRepository.FindOne(idPr);
            IList <ParticipantDTO> participantDTOs = new List <ParticipantDTO>();
            var ids = inscriereRepository.FindParticipantByProba(proba.ID);

            foreach (int id in ids)
            {
                Participant   participant = participantRepository.FindOne(id);
                var           idProbe     = inscriereRepository.FindProbaByParticipant(id);
                IList <Proba> probe       = new List <Proba>();
                foreach (var idProba in idProbe)
                {
                    Proba findProba = probaRepository.FindOne(idProba);
                    probe.Add(findProba);
                }
                ParticipantDTO dto = new ParticipantDTO(participant, probe);
                participantDTOs.Add(dto);
            }
            return(participantDTOs);
        }
예제 #2
0
 public Participant findParticipant(int id)
 {
     return(participantRepo.FindOne(id));
 }