Exemplo n.º 1
0
        static public ICollection <DoctorDTO> GetSomeDoctors()
        {
            GHRepository <Doctor> repo        = new GHRepository <Doctor>();
            List <Doctor>         doctors_old = new List <Doctor>(repo.GetEntities(x => x.Id > 0).ToList().OrderBy(x => x.Surname));

            ObservableCollection <DoctorDTO> doctors = new ObservableCollection <DoctorDTO>();
            DoctorDTO doctor;

            foreach (var a in doctors_old)
            {
                doctor = DTOConverter.Convert <Doctor, DoctorDTO>(a);
                doctors.Add(doctor);
            }
            return(doctors);
        }
Exemplo n.º 2
0
        static public ICollection <PatientDTO> GetSomePatients()
        {
            GHRepository <Patient> repo         = new GHRepository <Patient>();
            List <Patient>         patients_old = new List <Patient>(repo.GetEntities(x => x.Id > 0).ToList().OrderBy(x => x.Surname));

            ObservableCollection <PatientDTO> patients = new ObservableCollection <PatientDTO>();
            PatientDTO patient;

            foreach (var a in patients_old)
            {
                patient = DTOConverter.Convert <Patient, PatientDTO>(a);
                patients.Add(patient);
            }
            return(patients);
        }