diff --git a/docs/en/CurrentUser.md b/docs/en/CurrentUser.md index 5a400dc098..ac2aaa20bf 100644 --- a/docs/en/CurrentUser.md +++ b/docs/en/CurrentUser.md @@ -90,7 +90,7 @@ Beside these standard methods, there are some extension methods: For a web application, it gets the `User` property of the current `HttpContext`. For a non-web application, it returns the `Thread.CurrentPrincipal`. -> You generally don't need to this low level `ICurrentPrincipalAccessor` service and directly work with the `ICurrentUser` explained above. +> You generally don't need to use this low level `ICurrentPrincipalAccessor` service and just directly work with the `ICurrentUser` explained above. ### Basic Usage 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..4f7b985faa 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,8 +231,8 @@ public class MongoDbRepository { SetModificationAuditProperties(entity); - var isSoftDeleteEntity = typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)); - if (isSoftDeleteEntity) + var isEntityDeleted = entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted; + if (isEntityDeleted) { SetDeletionAuditProperties(entity); TriggerEntityDeleteEvents(entity);