I have a list of objects (say family), and each object contains a list of other non-value type object (say child). I would like to query this list and specify the where clause dynamically (during run-time).
var fselected = from f in families
from c in f.Children
where (f.FamilyAge > 15 && c.Age > 13)
select f;
The closest thing I found that would do that is Dynamic LINQ on NuGet, but beyond the simple where clause on the top level object, I can't find any examples on how to do above statement.
The only solution I can think of is to split into separate where clause for C and for F, run the c query first, then run F query on resultant data set...