public IEnumerable <TruncatedPatient> GetAllPatients() { using (ClinicContext context = ClinicContextProvider.GetContext()) { return(context.Patients.ToList().Select(x => truncatedPatientMapper.Map(x))); } }
public TruncatedTreatPlan Map(TreatPlan p) { return(new TruncatedTreatPlan { Id = p.Id, Begin = p.Begin, End = p.End, Disease = truncatedDiseaseMapper.Map(p.Disease), Doctor = truncatedDoctorMapper.Map(p.Doctor), Medication = truncatedMedicationMapper.Map(p.Medication), Patient = truncatedPatientMapper.Map(p.Patient) }); }