public IEnumerable <Doctor> GetFilteredDoctors(DoctorFilter filter) { ISpecification <Doctor> specification = new DoctorSpecificationConverter(filter).GetSpecification(); var doctors = Find(specification); Bind(doctors); return(doctors); }
public IEnumerable <Doctor> GetFilteredDoctors(DoctorFilter filter) { ISpecification <Doctor> specification = new DoctorSpecificationConverter(filter).GetSpecification(); var doctors = Find(specification); var eagerDocs = GetAllEager(); IEnumerable <Doctor> result = new List <Doctor>(); foreach (var doctor in doctors) { foreach (var eagerDoc in eagerDocs) { if (doctor.GetId() == eagerDoc.GetId()) { result.Append(eagerDoc); } } } return(result); }