Browse Source
Update EfCoreIdentityUserRepository.cs
pull/21989/head
Mansur Besleney
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
5 deletions
-
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
|
|
|
@ -456,6 +456,11 @@ public class EfCoreIdentityUserRepository : EfCoreRepository<IIdentityDbContext, |
|
|
|
{ |
|
|
|
var upperFilter = filter?.ToUpperInvariant(); |
|
|
|
var query = await GetQueryableAsync(); |
|
|
|
|
|
|
|
if (id.HasValue) |
|
|
|
{ |
|
|
|
return query.Where(x => x.Id == id); |
|
|
|
} |
|
|
|
|
|
|
|
if (roleId.HasValue) |
|
|
|
{ |
|
|
|
@ -464,11 +469,6 @@ public class EfCoreIdentityUserRepository : EfCoreRepository<IIdentityDbContext, |
|
|
|
query = query.Where(identityUser => identityUser.Roles.Any(x => x.RoleId == roleId.Value) || identityUser.OrganizationUnits.Any(x => organizationUnitIds.Contains(x.OrganizationUnitId))); |
|
|
|
} |
|
|
|
|
|
|
|
if (id.HasValue) |
|
|
|
{ |
|
|
|
return query.Where(x => x.Id == id); |
|
|
|
} |
|
|
|
|
|
|
|
return query |
|
|
|
.WhereIf( |
|
|
|
!filter.IsNullOrWhiteSpace(), |
|
|
|
|