title: Reflector generated Lambda Expression, how to get back back actual Linq Query?
body: <p>I'm using Reflector to decompile some binaries. I'm having problem with Lambda Expressions and <a href="http://www.jasonbock.net/jb/Default.aspx?blog=entry.9b4d67c1109f490186dbc6353975329d" rel="nofollow">methodof</a> which doesn't compile. lambda Expression seems super complicated to me and I have no idea how to convert it back to Compilable LINQ Code. here is the code:</p>
  
  <pre><code>public double? LoadSumRialAmount(long functionId, long? subFunctionId)
  {
          ParameterExpression expression;
          if (!subFunctionId.HasValue)
          {
              return (from func in base.MetaData.SubFunction
                  where func.FunctionId == functionId
                  select func).Select&lt;SubFunctionEntity, double?&gt;(System.Linq.Expressions.Expression.Lambda&lt;Func&lt;SubFunctionEntity, double?&gt;&gt;(System.Linq.Expressions.Expression.Multiply(System.Linq.Expressions.Expression.Property(expression = System.Linq.Expressions.Expression.Parameter(typeof(SubFunctionEntity), "func"), (MethodInfo) methodof(SubFunctionEntity.get_Volume)), System.Linq.Expressions.Expression.Property(expression, (MethodInfo) methodof(SubFunctionEntity.get_RialAmount))), new ParameterExpression[] { expression })).Sum();
          }
          return (from func in base.MetaData.SubFunction
              where (func.FunctionId == functionId) &amp;&amp; (func.SubFunctionId != subFunctionId)
              select func).Select&lt;SubFunctionEntity, double?&gt;(System.Linq.Expressions.Expression.Lambda&lt;Func&lt;SubFunctionEntity, double?&gt;&gt;(System.Linq.Expressions.Expression.Multiply(System.Linq.Expressions.Expression.Property(expression = System.Linq.Expressions.Expression.Parameter(typeof(SubFunctionEntity), "func"), (MethodInfo) methodof(SubFunctionEntity.get_Volume)), System.Linq.Expressions.Expression.Property(expression, (MethodInfo) methodof(SubFunctionEntity.get_RialAmount))), new ParameterExpression[] { expression })).Sum();
  }
  </code></pre>
  
  <p>p.s another error is SubFunctionEntity class has a "Volume" property, and I don't understand why this code is calling some kind of static property on it like: SubFunctionEntity.get_Volume</p>