修复一个可能存在的null引用问题

This commit is contained in:
falcon 2022-04-08 09:57:01 +08:00
parent 520abc3454
commit e16e28da2d

View File

@ -154,9 +154,11 @@ namespace Falcon.SugarApi.DatabaseDefinitions
var type = types[i]; var type = types[i];
if (!InitdTable.Any(m => m == type.FullName)) { if (!InitdTable.Any(m => m == type.FullName)) {
this.CodeFirst.BackupTable().SetStringDefaultLength(200).InitTables(type); this.CodeFirst.BackupTable().SetStringDefaultLength(200).InitTables(type);
if (type.FullName != null) {
InitdTable.Add(type.FullName); InitdTable.Add(type.FullName);
} }
} }
}
} }