public IEnumerable <Pray> PrayByTime(DateTime time, KindPray kp) { var condition1 = D.getAllPrays(p => p.time.CompareTo(time) >= 0); var condition2 = D.getAllPrays(p => p.pray == kp); var result = from item1 in condition1 from item2 in condition2 where (item1.pray == item2.pray && item1.synag == item2.synag && item1.time == item2.time) select item2; return(result); }
public IEnumerable <Pray> getPrays(Synagogue s, KindPray kp) { return(s.prays.Where(p => p.pray == kp)); }
public IEnumerable <Pray> PrayByKind(Synagogue s, KindPray kp) { return(D.getPrays(s, kp)); }