From aab29f4290c968665312bfc98c5598a25a4debf9 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 21 5月 2025 16:42:31 +0800 Subject: [PATCH] 优化 --- Weben_CMS专用代码生成器/queryExtensions/CmsQueryExtensions/Extension/DynamicSearchParameters/PredicateExtensions/PredicateExtensions.cs | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/queryExtensions/CmsQueryExtensions/Extension/DynamicSearchParameters/PredicateExtensions/PredicateExtensions.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/queryExtensions/CmsQueryExtensions/Extension/DynamicSearchParameters/PredicateExtensions/PredicateExtensions.cs" index d8796d5..1dd935a 100644 --- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/queryExtensions/CmsQueryExtensions/Extension/DynamicSearchParameters/PredicateExtensions/PredicateExtensions.cs" +++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/queryExtensions/CmsQueryExtensions/Extension/DynamicSearchParameters/PredicateExtensions/PredicateExtensions.cs" @@ -40,9 +40,13 @@ return Expression.Lambda<T>(merge(first.Body, secondBody), first.Parameters); } - public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) + //public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) + //{ + // return first.Compose(second, Expression.And); + //} + public static Expression<Func<T, bool>> AndAlso<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) { - return first.Compose(second, Expression.And); + return first.Compose(second, Expression.AndAlso); } public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) -- Gitblit v1.9.3