diff --git a/Infrastructure/DynamicLinq.cs b/Infrastructure/DynamicLinq.cs
index f1c3d9d7..dc2af051 100644
--- a/Infrastructure/DynamicLinq.cs
+++ b/Infrastructure/DynamicLinq.cs
@@ -254,38 +254,38 @@ namespace Infrastructure
}
else //or
{
- return result.Or(gresult);
+ return Expression.OrElse( result, gresult);
}
}
///
/// 转换FilterGroup[]为表达式,不管FilterGroup里面的Filters
///
- ///
+ ///
///
///
///
///
- private static Expression ConvertGroup(QueryObject[] groups, ParameterExpression param, string operation)
+ private static Expression ConvertGroup(QueryObject[] queryObjs, ParameterExpression param, string operation)
{
- if (groups == null || !groups.Any()) return null;
+ if (queryObjs == null || !queryObjs.Any()) return null;
- Expression result = ConvertGroup(groups[0], param);
+ Expression result = ConvertGroup(queryObjs[0], param);
- if (groups.Length == 1) return result;
+ if (queryObjs.Length == 1) return result;
if (operation == "and")
{
- foreach (var filter in groups.Skip(1))
+ foreach (var filter in queryObjs.Skip(1))
{
result = result.AndAlso(ConvertGroup(filter, param));
}
}
else
{
- foreach (var filter in groups.Skip(1))
+ foreach (var filter in queryObjs.Skip(1))
{
- result = result.Or(ConvertGroup(filter, param));
+ result = Expression.OrElse(result, ConvertGroup(filter, param));
}
}
@@ -325,7 +325,7 @@ namespace Infrastructure
{
foreach (var filter in filters.Skip(1))
{
- result = result.Or(param.GenerateBody(filter));
+ result = Expression.OrElse(result, param.GenerateBody(filter));
}
}