From 7946235c62aac09060cc158601f3a621f0f96109 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 22 Jan 2018 11:35:48 +0800 Subject: [PATCH] - --- .../Abstract/ExpressionableProvider/Expressionable.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/ExpressionableProvider/Expressionable.cs b/Src/Asp.Net/SqlSugar/Abstract/ExpressionableProvider/Expressionable.cs index 1bd63967b..af8da48aa 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/ExpressionableProvider/Expressionable.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/ExpressionableProvider/Expressionable.cs @@ -8,7 +8,7 @@ namespace SqlSugar { public class Expressionable where T : class, new() { - Expression> _exp = it=>true; + Expression> _exp = null; public Expressionable And(Expression> exp) { @@ -45,6 +45,8 @@ namespace SqlSugar public Expression> ToExpression() { + if (_exp == null) + _exp = it => true; return _exp; } }