|
|
|
@ -8,6 +8,8 @@ using MongoDB.Driver.Linq;
|
|
|
|
|
using Volo.Abp.Domain.Repositories.MongoDB;
|
|
|
|
|
using Volo.Abp.IdentityServer.IdentityResources;
|
|
|
|
|
using Volo.Abp.MongoDB;
|
|
|
|
|
using System.Linq.Dynamic.Core;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Volo.Abp.IdentityServer.MongoDB
|
|
|
|
|
{
|
|
|
|
@ -17,6 +19,15 @@ namespace Volo.Abp.IdentityServer.MongoDB
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual async Task<List<IdentityResource>> GetListAsync(string sorting, int skipCount, int maxResultCount, bool includeDetails = false, CancellationToken cancellationToken = default)
|
|
|
|
|
{
|
|
|
|
|
return await GetMongoQueryable()
|
|
|
|
|
.OrderBy(sorting ?? nameof(IdentityResource.Name))
|
|
|
|
|
.As<IMongoQueryable<IdentityResource>>()
|
|
|
|
|
.PageBy<IdentityResource, IMongoQueryable<IdentityResource>>(skipCount, maxResultCount)
|
|
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<List<IdentityResource>> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false,
|
|
|
|
|
CancellationToken cancellationToken = default)
|
|
|
|
|
{
|
|
|
|
@ -24,5 +35,10 @@ namespace Volo.Abp.IdentityServer.MongoDB
|
|
|
|
|
.Where(ar => scopeNames.Contains(ar.Name))
|
|
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual async Task<long> GetTotalBlogCount()
|
|
|
|
|
{
|
|
|
|
|
return await GetCountAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|