I'm using a tool that creates LambdaExpressions from a gui. I want the that expression as c# (or even compilable IL) so that I can combine it into an assembly for later executilon.
The Body property returns a string that looks like c# but uses constants like True and AndAlso instead of true and &&. I understand why.
Is there built in way to convert that LambdaExpression, or any implementation of Expression, to a *.dll?
This is the output of the Body property
((((x.Hospitalizations != null) AndAlso x.Hospitalizations.Any(x => Equals(x.TreatingPhysician, "Dr Ash Williams", OrdinalIgnoreCase))) == False) AndAlso (Convert(x.Pulse, Nullable`1) > Convert(50, Nullable`1)))
and from that LambdaExpression class I can, of course, get important things like the type and name of the object