public Secretary GetEager(UserID id) { var secretary = GetByID(id); var timetables = _timeTableRepository.GetAll(); secretary.TimeTable = GetTimeTableById(secretary.TimeTable, timetables); var hospitals = _hospitalRepository.GetAll(); secretary.Hospital = GetHospitalById(secretary.Hospital, hospitals); return(secretary); }
public Manager GetEager(UserID id) { var manager = GetByID(id); var timetables = _timeTableRepository.GetAll(); manager.TimeTable = GetTimeTableById(manager.TimeTable, timetables); var hospitals = _hospitalRepository.GetAll(); manager.Hospital = GetHospitalById(manager.Hospital, hospitals); return(manager); }
public IList <TimeTableModel> GetAllTimetables() { IList <TimeTableEntity> timetables = timeTableRepository.GetAll(); return(timetables.Select(x => new TimeTableModel(x.Id, x.Day, new ClassModel(x.Class.Id) , new SubjectModel(x.Subject.Id, x.Subject.Name))).ToList()); }
public Doctor GetEager(UserID id) { var doctor = GetByID(id); var hospitals = _hospitalRepository.GetAll(); doctor.Hospital = GetHospitalById(doctor.Hospital, hospitals); var timetables = _timeTableRepository.GetAll(); doctor.TimeTable = GetTimeTableById(doctor.TimeTable, timetables); var rooms = _roomRepository.GetAll(); doctor.Office = GetOfficeById(doctor.Office, rooms); return(doctor); }
public IEnumerable <TimeTable> GetTimeTables() { return(_timeTableRepository.GetAll()); }