Browse Source

修改 分页查询时 无法处理int?string?这样的值

master
boxu.zheng 1 year ago
parent
commit
d569d7f530
  1. 4
      Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/AppBase/Filters/FilterExtensions.cs

4
Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.Application.Contracts/AppBase/Filters/FilterExtensions.cs

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

Loading…
Cancel
Save