I have a this line of code:
var predicate = Expression.Lambda<Func<TEntityType, bool>>(body, param);
where TEntityType is a generic parm.
However, I don’t have generic parm available. I do have:
Type _EntityType;
What is the non-generic syntax for Expression.Lambda is this case?
Thanks
There’s an overload for
Expression.Lambdathat takes the type of the expression body, so you just need to create the type dynamically before calling that overload.