title: Serialize LambdaExpression to and from string for saving in a database
body: <p>Is it possible to serialize an <code>Expression&lt;T&gt;</code> or <code>LambdaExpression</code>? I need to save the expression tree in a database (<code>varchar</code> column).</p>
  
  <pre><code>var expr = (LambdaExpression)expression;
  if (expr != null)
  {   
      var newBody = Expression.Convert(expr.Body, typeof(string));
      var expr2 = Expression.Lambda(newBody, expr.Parameters);
      var castedExpression = expr2 as Expression&lt;Func&lt;ShipmentViewModel, string&gt;&gt;;
  
      Func = castedExpression.Compile();
  }
  </code></pre>
  
  <p>I want to reconstruct the <code>LambdaExpression</code>, compile and reuse it. Currently, I'm not able to find any solution.</p>