private ISpecification <Therapy> GetSpecificationByTherapyTime(TherapyTime time) { return(new ExpressionSpecification <Therapy>(o => o.Prescription.MedicalTherapies.Select(mt => mt.Dose.Dosage.Find(d => d.TherapyTime.Equals(time)) != null) != null)); }
private ISpecification <Therapy> GetSpecificationByTherapyTime(TherapyTime time) { return(new ExpressionSpecification <Therapy>(o => o.Prescription.Medicine.Values.ToList <TherapyDose>().SelectMany <TherapyDose, TherapyTime>(t => t.Dosage.Keys).Contains <TherapyTime>(time))); }