public List <Domain.Entities.Appointment> AddRoomToAppointment(List <MedbayTech.Appointment.Domain.Entities.Appointment> appointments) { foreach (Domain.Entities.Appointment appointment in appointments) { Doctor doctor = _userGateway.GetDoctorBy(appointment.DoctorId); appointment.RoomId = doctor.ExaminationRoomId; appointment.Room = _roomGateway.GetRoomBy(appointment.RoomId); } return(appointments); }
private void BindProperties(Appointment appointment) { appointment.Doctor = _userGateway.GetDoctorBy(appointment.DoctorId); appointment.Patient = _userGateway.GetPatientBy(appointment.PatientId); appointment.Room = _roomGateway.GetRoomBy(appointment.RoomId); }