I have an expression in the format of Expression<Func<T, T2, bool>>
that I need to convert into an expression on the format of Expression<Func<T2, bool>>
by replacing the T in the first expression with a constant value.
I need this to stay as an expression so I can't just Invoke the expression with a constant as the first parameter.
I've looked at the other questions here about expression trees but I can't really find a solution to my problem. I suspect I have to walk the expression tree to introduce the constant and remove one parameter but I don't even know where to start at the moment. :(