Skip to content

Commit 819251c

Browse files
committed
Update EfCoreTableFluent`1.cs
修复数据库无法连接的时候,codefirst的HasData会导致SyncStructure迁移死循环调用,然后Stackoverflow异常
1 parent 443d37b commit 819251c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

FreeSql.DbContext/EfCoreFluentApi/EfCoreTableFluent`1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ public EfCoreTableFluent<T> HasData(IEnumerable<T> data)
344344
lock (sdCopyLock)
345345
sd = sdCopy?.ToArray();
346346
if (sd == null || sd.Any() == false) return;
347+
if (e.Exception != null) return;
347348
foreach (var et in e.EntityTypes)
348349
{
349350
if (et != typeof(T)) continue;

0 commit comments

Comments
 (0)