Ejemplo n.º 1
0
        public IEnumerable <Medicine> GetFilteredMedicine(MedicineFilter medicineFilter)
        {
            ISpecification <Medicine> medicineSpecification = new MedicineSpecificationConverter(medicineFilter).GetSpecification();
            var meds = Find(medicineSpecification);

            Bind(meds);
            return(meds);
        }
Ejemplo n.º 2
0
        public IEnumerable <Medicine> GetFilteredMedicine(MedicineFilter medicineFilter)
        {
            ISpecification <Medicine> medicineSpecification = new MedicineSpecificationConverter(medicineFilter).GetSpecification();
            var meds      = Find(medicineSpecification);
            var eagerMeds = GetAllEager();
            IEnumerable <Medicine> result = new List <Medicine>();

            foreach (var med in meds)
            {
                foreach (var eagerMed in eagerMeds)
                {
                    if (med.Id == eagerMed.Id)
                    {
                        result.Append(eagerMed);
                    }
                }
            }
            return(result);
        }