I have a function which I want to run on every executed Linq query on a DbContext to modify the expression tree before execution. I've been having a look at the IDbCommandTreeInterceptor interface but that doesn't seem to provide an expression tree (which I suppose is understandable since it may not have been a Linq query by the time it gets to this point).
Is there any way I can intercept and modify all expressions before execution?
nb. This has to be Linq tree modification because I have already built a framework for modifying Linq trees which was originally for Linq to SQL.