From de8194582775ad5026420fa5820cdeb19a538e46 Mon Sep 17 00:00:00 2001 From: wayne Date: Sat, 21 Sep 2024 21:27:54 +0800 Subject: [PATCH] Stops tracking all currently tracked entities. --- src/EasyFrameWork/RepositoryPattern/ServiceBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EasyFrameWork/RepositoryPattern/ServiceBase.cs b/src/EasyFrameWork/RepositoryPattern/ServiceBase.cs index d85988c10..e00ac1584 100644 --- a/src/EasyFrameWork/RepositoryPattern/ServiceBase.cs +++ b/src/EasyFrameWork/RepositoryPattern/ServiceBase.cs @@ -360,6 +360,7 @@ private void SaveChanges() if(!isInBulkSaving) { DbContext.SaveChanges(); + DbContext.ChangeTracker.Clear(); } }