From 821878f64d5550ff4faa338553743676d32d5fef Mon Sep 17 00:00:00 2001 From: xusc Date: Fri, 2 Feb 2024 09:37:35 +0800 Subject: [PATCH] .. --- .../ICS.Common/Extension/LinqExpressionExt.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs b/src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs index 9bce8856..f366cae1 100644 --- a/src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs +++ b/src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs @@ -88,18 +88,11 @@ namespace ICS.Common.Extension constant = Expression.Constant(filterCondition.ColumnValue); break; case ConfigColumnDataType.type_int: - if (currentProp.PropertyType == typeof(int)) - { - constant = Expression.Constant(filterCondition.ColumnValue.ToInt()); - } - else - { - constant = Expression.Constant(filterCondition.ColumnValue.ToIntWithNull()); - } + constant = Expression.Constant(filterCondition.ColumnValue.ToInt(), currentProp.PropertyType); break; case ConfigColumnDataType.type_decimal: - constant = Expression.Constant(filterCondition.ColumnValue.ToDecimal()); + constant = Expression.Constant(filterCondition.ColumnValue.ToDecimal(), currentProp.PropertyType); break; case ConfigColumnDataType.type_datetime: constant = Expression.Constant(filterCondition.ColumnValue.ToDate(), currentProp.PropertyType);