|
@ -148,12 +148,12 @@ public static class FilterExtensions |
|
|
{ |
|
|
{ |
|
|
var objValue = Convert.ChangeType(value, propertyType.GetGenericArguments()[0], |
|
|
var objValue = Convert.ChangeType(value, propertyType.GetGenericArguments()[0], |
|
|
CultureInfo.InvariantCulture); |
|
|
CultureInfo.InvariantCulture); |
|
|
constant = Expression.Constant(objValue); |
|
|
constant = Expression.Constant(objValue, propertyType); |
|
|
} |
|
|
} |
|
|
else if (propertyType.IsEnum) |
|
|
else if (propertyType.IsEnum) |
|
|
{ |
|
|
{ |
|
|
var enumValue = (Enum)Enum.Parse(propertyType, value, true); |
|
|
var enumValue = (Enum)Enum.Parse(propertyType, value, true); |
|
|
constant = Expression.Constant(enumValue); |
|
|
constant = Expression.Constant(enumValue, propertyType); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|