From 7dbc4fd460691b9c749987c02e6fb80db16a898b Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 May 2022 10:56:28 +0800 Subject: [PATCH] Add missing condition for UpdatManyAsync --- .../Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index 388330e69a..e0c4c531c4 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -231,7 +231,7 @@ public class MongoDbRepository { SetModificationAuditProperties(entity); - var isSoftDeleteEntity = typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)); + var isSoftDeleteEntity = entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted; if (isSoftDeleteEntity) { SetDeletionAuditProperties(entity);