I'm making a hot swappable filter for my entities that depend on a mode selected. I'd like to be able to call something like
list.Where(e => Filter.Func(e)).ToList();
With this
public class Filter() {
public Func<CollectedDataRecord, bool> Func = (o) => true;
//code that assigns other Func's depending on case
}
Basically that's it. But I get 'The LINQ expression node type 'Invoke' is not supported in LINQ to Entities.'
I've seen this question But I didn't get the solution.
Is it possible of I should make it in a different way. May be make Table Functions in SQL?