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
parent
commit
05a966e478
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs
  2. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs
  3. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
  4. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs
  5. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs
  6. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs
  7. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs
  8. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs

2
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs

@ -70,7 +70,7 @@ namespace Volo.Abp.IdentityServer.ApiResources
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default)
{ {
return await DbSet return await (await GetDbSetAsync())
.WhereIf(!filter.IsNullOrWhiteSpace(), .WhereIf(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

2
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs

@ -50,7 +50,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default)
{ {
return await DbSet return await (await GetDbSetAsync())
.WhereIf(!filter.IsNullOrWhiteSpace(), .WhereIf(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

2
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs

@ -43,7 +43,7 @@ namespace Volo.Abp.IdentityServer.Clients
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) 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)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter))
.LongCountAsync(GetCancellationToken(cancellationToken)); .LongCountAsync(GetCancellationToken(cancellationToken));
} }

2
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs

@ -57,7 +57,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default)
{ {
return await DbSet return await (await GetDbSetAsync())
.WhereIf(!filter.IsNullOrWhiteSpace(), .WhereIf(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

2
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs

@ -58,7 +58,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) 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(), .WhereIf<ApiResource, IMongoQueryable<ApiResource>>(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

2
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs

@ -55,7 +55,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) 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(), .WhereIf<ApiScope, IMongoQueryable<ApiScope>>(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

2
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs

@ -50,7 +50,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) 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(), .WhereIf<Client, IMongoQueryable<Client>>(!filter.IsNullOrWhiteSpace(),
x => x.ClientId.Contains(filter)) x => x.ClientId.Contains(filter))
.LongCountAsync(GetCancellationToken(cancellationToken)); .LongCountAsync(GetCancellationToken(cancellationToken));

2
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs

@ -32,7 +32,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) 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(), .WhereIf<IdentityResource, IMongoQueryable<IdentityResource>>(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) || x => x.Name.Contains(filter) ||
x.Description.Contains(filter) || x.Description.Contains(filter) ||

Loading…
Cancel
Save