Browse Source
Merge pull request #12763 from abpframework/auto-merge/rel-5-3/1111
Merge branch dev with rel-5.3
pull/12780/head
Enis Necipoglu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
docs/en/CurrentUser.md
-
framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
|
|
@ -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`. |
|
|
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 |
|
|
### Basic Usage |
|
|
|
|
|
|
|
|
|
|
|
@ -231,8 +231,8 @@ public class MongoDbRepository<TMongoDbContext, TEntity> |
|
|
{ |
|
|
{ |
|
|
SetModificationAuditProperties(entity); |
|
|
SetModificationAuditProperties(entity); |
|
|
|
|
|
|
|
|
var isSoftDeleteEntity = typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)); |
|
|
var isEntityDeleted = entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted; |
|
|
if (isSoftDeleteEntity) |
|
|
if (isEntityDeleted) |
|
|
{ |
|
|
{ |
|
|
SetDeletionAuditProperties(entity); |
|
|
SetDeletionAuditProperties(entity); |
|
|
TriggerEntityDeleteEvents(entity); |
|
|
TriggerEntityDeleteEvents(entity); |
|
|
|