From ed5871f16847655c3254599685a554d5e3dd71e3 Mon Sep 17 00:00:00 2001 From: Nicolas <36539498+hnicolus@users.noreply.github.com> Date: Sun, 22 May 2022 00:13:13 +0200 Subject: [PATCH 1/4] fixed statement. I am Assuming that the statement : "You generally don't need to this low level ICurrentPrincipalAccessor service and directly work with the ICurrentUser explained above." meant : "You generally don't need to use this low level ICurrentPrincipalAccessor service just directly work with the ICurrentUser explained above." --- docs/en/CurrentUser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/CurrentUser.md b/docs/en/CurrentUser.md index 5a400dc098..6b706bc481 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 just directly work with the `ICurrentUser` explained above. ### Basic Usage From 15caeb028fd3b364a17fbc5020368cd9440a0a87 Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Tue, 24 May 2022 10:02:54 +0300 Subject: [PATCH 2/4] Update CurrentUser.md --- docs/en/CurrentUser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/CurrentUser.md b/docs/en/CurrentUser.md index 6b706bc481..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 use this low level `ICurrentPrincipalAccessor` service just 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 From 7dbc4fd460691b9c749987c02e6fb80db16a898b Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 May 2022 10:56:28 +0800 Subject: [PATCH 3/4] 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); From bc7d3cedc9266254768f05a49ec5484504285daa Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Thu, 26 May 2022 10:59:18 +0800 Subject: [PATCH 4/4] rename isSoftDeleteEntity to isEntityDeleted --- .../Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e0c4c531c4..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 = entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted; - if (isSoftDeleteEntity) + var isEntityDeleted = entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted; + if (isEntityDeleted) { SetDeletionAuditProperties(entity); TriggerEntityDeleteEvents(entity);