Preserving calculations in The Database : An Answer

So it seems as though Jon Skeet tipped me off to a way that some code can be wrapped in an Expression and a func. The code can then be converted to a string of the code itself.

Which gives a string output of

This made me realize I could persist the string to a database. Retrieve it and then I was not sure as to what to do with that string. Then I realized I could save all the Expressions in a List. And then Search through the List to find the expression.

So I gave it a try.

This isn’t the best solution. But it works.

SHIP IT.