From e16e28da2de730a75a76cc689b093a4793c74b61 Mon Sep 17 00:00:00 2001 From: falcon <9504402@qq.com> Date: Fri, 8 Apr 2022 09:57:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=AD=98=E5=9C=A8=E7=9A=84null=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs b/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs index c312744..4154946 100644 --- a/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs +++ b/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs @@ -154,7 +154,9 @@ namespace Falcon.SugarApi.DatabaseDefinitions var type = types[i]; if (!InitdTable.Any(m => m == type.FullName)) { this.CodeFirst.BackupTable().SetStringDefaultLength(200).InitTables(type); - InitdTable.Add(type.FullName); + if (type.FullName != null) { + InitdTable.Add(type.FullName); + } } }