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); }
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); }
public GetCollegeByIdQuery GetById(Guid id) { return(_repository.GetById(id)); }
public BLModel.College GetCollageByID(int collegeID) { return((BLModel.College) new BLModel.College().InjectFrom(_collegeRepository.GetById(collegeID))); }