From c61c1c47a6572399be728665dbbb856ee3e7e3b8 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Thu, 27 Oct 2022 10:09:32 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20EndEdit=20=E6=9C=AA?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=20OnEntityChange=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql.DbContext/Repository/Repository/BaseRepository.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FreeSql.DbContext/Repository/Repository/BaseRepository.cs b/FreeSql.DbContext/Repository/Repository/BaseRepository.cs index 6f697777..81bf8e2a 100644 --- a/FreeSql.DbContext/Repository/Repository/BaseRepository.cs +++ b/FreeSql.DbContext/Repository/Repository/BaseRepository.cs @@ -181,9 +181,10 @@ namespace FreeSql UnitOfWork.Dispose(); UnitOfWork = olduow; } - return affrows; + return affrows + _db.SaveChanges(); } - return _dbset.EndEdit(data); + var affrows2 = _dbset.EndEdit(data); + return affrows2 + _db.SaveChanges(); } }