public static IEnumerable<MatchingRule> QueryRules(IEnumerable<MatchingRule> allRules) { return allRules.Where(r => (r.MatchCount == 0 && r.Created < CutOffDate) || (r.MatchCount > 0 && r.LastMatch < CutOffDate)); }