File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/NHibernate/Linq/Visitors Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 20
20
using System . Linq . Expressions ;
21
21
using NHibernate . Collection ;
22
22
using NHibernate . Engine ;
23
+ using NHibernate . Impl ;
23
24
using NHibernate . Linq . Functions ;
24
25
using NHibernate . Util ;
25
26
using Remotion . Linq . Parsing ;
@@ -143,14 +144,8 @@ private Expression EvaluateSubtree(Expression subtree)
143
144
144
145
return constantExpression ;
145
146
}
146
- else
147
- {
148
- Expression < Func < object > > lambdaWithoutParameters = Expression . Lambda < Func < object > > ( Expression . Convert ( subtree , typeof ( object ) ) ) ;
149
- var compiledLambda = lambdaWithoutParameters . Compile ( ) ;
150
147
151
- object value = compiledLambda ( ) ;
152
- return Expression . Constant ( value , subtree . Type ) ;
153
- }
148
+ return Expression . Constant ( ExpressionProcessor . FindValue ( subtree ) , subtree . Type ) ;
154
149
}
155
150
156
151
#region NH additions
You can’t perform that action at this time.
0 commit comments