Creating your own expressions
Expressions are pretty much as powerful and capable as the .NET runtime. That means that we can express all operations that the intermediate language holds and eventually the runtime executes. Constructs are very different from the intermediate language, as we saw in Chapter 7, Reasoning about Expressions. They’re all focused around a tree structure with left and right expressions representing the nodes in the tree.
With expressions, we don’t necessarily need to limit ourselves to using them as a means to filter data, but we could in fact use them to hold logic that performs operations. Since they are just as powerful as the intermediate language, we could go and generate very complex expression trees.
But with great power comes great responsibility. Even though this is possible, it doesn’t mean it’s necessarily a good idea. The structures can be hard to understand and debug, so I would recommend not going all in and treating...