From a7ddaff4707e9cd5a8e30789b51a6187f87baeaa Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Thu, 24 Oct 2024 14:22:03 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20UnionAll=20=E4=B8=BA?= =?UTF-8?q?=20null=20=E7=9A=84=20query=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Internal/CommonProvider/SelectProvider/Select1Provider.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider.cs b/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider.cs index 99fd0dc27..a06685c5d 100644 --- a/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider.cs +++ b/FreeSql/Internal/CommonProvider/SelectProvider/Select1Provider.cs @@ -213,6 +213,8 @@ public ISelect FromQuery(ISelect select2 public ISelect UnionAll(params ISelect[] querys) { + querys = querys?.Where(q => q != null).ToArray(); + if (querys?.Any() != true) return this; var ret = (_orm as BaseDbProvider).CreateSelectProvider(null) as Select1Provider; var sb = new StringBuilder().Append(LocalGetQuerySql(this)); foreach (var select2 in querys)