public List <CulturalExchange> GetAll(Guid idEnvironment, bool active)
        {
            var culturalExchangeEntity = _culturalExchangeRepository
                                         .FindByFilter(x => x.Environment.Id == idEnvironment && x.Available == active);

            culturalExchangeEntity.ForEach(x =>
            {
                x.College = _collegeRepository.GetById(x.CollegeId);

                if (x.AccomodationId.HasValue)
                {
                    x.Accomodation = _accomodationRepository.GetById(x.AccomodationId.Value);
                }

                x.Student     = _studentRepository.GetById(x.StudentId);
                x.CollegeTime = _collegeTimeRepository.GetById(x.CollegeTimeId);
            });

            return(culturalExchangeEntity);
        }
Beispiel #2
0
        public Accomodation GetAccomodationAndCulturalExchangeList(Guid id)
        {
            var accomodation = _accomodationRepository.GetAccomodationAndCulturalExchangeList(id);

            accomodation.CulturalExchanges.ForEach(ce =>
            {
                ce.Student     = _studentRepository.GetById(ce.StudentId);
                ce.CollegeTime = _collegeTimeRepository.GetById(ce.CollegeTimeId);
                ce.College     = _collegeRepository.GetById(ce.CollegeId);
            });

            return(accomodation);
        }
Beispiel #3
0
 public GetCollegeByIdQuery GetById(Guid id)
 {
     return(_repository.GetById(id));
 }
Beispiel #4
0
 public BLModel.College GetCollageByID(int collegeID)
 {
     return((BLModel.College) new BLModel.College().InjectFrom(_collegeRepository.GetById(collegeID)));
 }