You may do something like this (pseudo code):
class Chemical
{
...
}
...
void ReportExpiredChemicals(int leadTimeInDays, Action<Chemical> report)
{
var cutoff = Today + leadTimeInDays;
DataContext dc = ...
var query = from c in dc.GetTable<Chemical>
where c.ExpireDate < cutoff
select c;
foreach(var c in query) report(c);
}
...
void SendEmailForExpiredChemical(Chemical chemical) { ... }
...
const int twoWeeks = 14;
ReportExpiredChemicals(twoWeeks, SendEmailForExpiredChemical);
Cheers
Andi