Browse Source
Merge pull request #7151 from abpframework/liangshiwei/identity-patch-1
Use async repository method in IdentityServer module
pull/7154/head
maliming
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
8 additions and
8 deletions
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs
|
|
|
@ -70,7 +70,7 @@ namespace Volo.Abp.IdentityServer.ApiResources |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
return await (await GetDbSetAsync()) |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|
|
|
|
@ -50,7 +50,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
return await (await GetDbSetAsync()) |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ namespace Volo.Abp.IdentityServer.Clients |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
return await (await GetDbSetAsync()) |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
return await (await GetDbSetAsync()) |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
.WhereIf<ApiResource, IMongoQueryable<ApiResource>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|
|
|
|
@ -55,7 +55,7 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
.WhereIf<ApiScope, IMongoQueryable<ApiScope>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|
|
|
|
@ -50,7 +50,7 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
.WhereIf<Client, IMongoQueryable<Client>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.ClientId.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
.WhereIf<IdentityResource, IMongoQueryable<IdentityResource>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
|