Browse Source
Use `DeleteAsync` instead of `DeleteDirectAsync`.
pull/18242/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
4 additions and
4 deletions
-
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentitySessionRepository.cs
-
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySessionRepository.cs
|
|
|
@ -68,11 +68,11 @@ public class EfCoreIdentitySessionRepository : EfCoreRepository<IIdentityDbConte |
|
|
|
|
|
|
|
public virtual async Task DeleteAllAsync(Guid userId, Guid? exceptSessionId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
await DeleteDirectAsync(x => x.UserId == userId && x.Id != exceptSessionId, cancellationToken); |
|
|
|
await DeleteAsync(x => x.UserId == userId && x.Id != exceptSessionId, cancellationToken: cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task DeleteAllAsync(Guid userId, string device, Guid? exceptSessionId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
await DeleteDirectAsync(x => x.UserId == userId && x.Device == device && x.Id != exceptSessionId, cancellationToken); |
|
|
|
await DeleteAsync(x => x.UserId == userId && x.Device == device && x.Id != exceptSessionId, cancellationToken: cancellationToken); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,11 +73,11 @@ public class MongoIdentitySessionRepository : MongoDbRepository<IAbpIdentityMong |
|
|
|
|
|
|
|
public virtual async Task DeleteAllAsync(Guid userId, Guid? exceptSessionId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
await DeleteDirectAsync(x => x.UserId == userId && x.Id != exceptSessionId, cancellationToken); |
|
|
|
await DeleteAsync(x => x.UserId == userId && x.Id != exceptSessionId, cancellationToken: cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task DeleteAllAsync(Guid userId, string device, Guid? exceptSessionId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
await DeleteDirectAsync(x => x.UserId == userId && x.Device == device && x.Id != exceptSessionId, cancellationToken); |
|
|
|
await DeleteAsync(x => x.UserId == userId && x.Device == device && x.Id != exceptSessionId, cancellationToken: cancellationToken); |
|
|
|
} |
|
|
|
} |
|
|
|
|