I'm trying to factorise some code. i've got lots of list of custom object. All are filtered on thier own specific fields and on one of their date. the filter date is complex and i would like to factorise it. Here is some code exemple :
var usaCustomer = Context.Customer.Where(x => x.Country == "USA" && FilterDate(x.DateMeeting)).ToList() ;
var happySeeder = Context.Seeder.Where(x => x.Feel == "Good" && FilterDate(x.LastConnection)).ToList() ;
So the question is how can i declare the FilterFunction to make some check on the datetime Given or how can i change my where clause to have custom filter and common filter ?
Thanks in advance.