fix forgot to specify second param.
This commit is contained in:
@@ -23,7 +23,8 @@ namespace PoweredSoft.DynamicLinq
|
||||
public enum QueryConvertStrategy
|
||||
{
|
||||
LeaveAsIs,
|
||||
ConvertConstantToComparedPropertyOrField
|
||||
ConvertConstantToComparedPropertyOrField,
|
||||
SpecifyType
|
||||
}
|
||||
|
||||
public enum QueryCollectionHandling
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace PoweredSoft.DynamicLinq.Helpers
|
||||
|
||||
// attempt a conversion.
|
||||
object convertedValue = TypeHelpers.ConvertFrom(memberType, value);
|
||||
return Expression.Constant(convertedValue);
|
||||
return Expression.Constant(convertedValue, memberType);
|
||||
}
|
||||
|
||||
public static ConstantExpression ResolveConstant(Expression member, object value, QueryConvertStrategy convertStrategy)
|
||||
@@ -89,6 +89,9 @@ namespace PoweredSoft.DynamicLinq.Helpers
|
||||
if (convertStrategy == QueryConvertStrategy.LeaveAsIs)
|
||||
return Expression.Constant(value);
|
||||
|
||||
if (convertStrategy == QueryConvertStrategy.SpecifyType)
|
||||
return Expression.Constant(value, member.Type);
|
||||
|
||||
if (convertStrategy == QueryConvertStrategy.ConvertConstantToComparedPropertyOrField)
|
||||
return QueryableHelpers.GetConstantSameAsLeftOperator(member, value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user