Sorry for the slow response and thanks for the link, but that doesn't seem to solve the issue. This is part of a generic query designer in which the end user can set filters for related entity collections. The reporting entities are all based on a SQL views. A StudentViewEntity has various related 1:n entity collections, such as classes, awards, activities.
It's easy to override/modify the GetMulti() to apply a filter if one is set, but how to set the filter. I could create a static filter dictionary with <entitynames, predicates> and use that in the GetMulti(), but that means there can only be one filter dictionary. Perhaps some DI framework is the way to go so that the filter collection is instance based per report rather than juts one static class.
Ideally the user would set the filtering on the related classes and I would then turn that into prefetch paths and fetch the data in one go. At the moment I'm using dynamic linq to construct the linq query expression.
IDataSource d = meta.GetQueryableForEntity((int)Data.Model.EntityType.StudentViewEntity);
Expression body = System.Linq.Dynamic.DynamicExpression.Parse(null, filterString, null);
var query = d.Provider.CreateQuery(body);
f = ((ILLBLGenProQuery)query).Execute<StudentViewCollection>();
I'll perhaps have to go back and look at creating prefetch paths in Linq or even go back to LLBLGEN Predicates.
Mark