Browse Source

Update EfCoreIdentityUserRepository.cs

pull/21989/head
Mansur Besleney 2 years ago
committed by GitHub
parent
commit
75d679a2db
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs

10
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(),

Loading…
Cancel
Save