|
|
@ -31,10 +31,14 @@ namespace Volo.Abp.Identity.MongoDB |
|
|
string sorting = null, |
|
|
string sorting = null, |
|
|
int maxResultCount = int.MaxValue, |
|
|
int maxResultCount = int.MaxValue, |
|
|
int skipCount = 0, |
|
|
int skipCount = 0, |
|
|
|
|
|
string filter = null, |
|
|
bool includeDetails = false, |
|
|
bool includeDetails = false, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
return await GetMongoQueryable() |
|
|
return await GetMongoQueryable() |
|
|
|
|
|
.WhereIf(filter != null, |
|
|
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
|
|
x.NormalizedName.Contains(filter)) |
|
|
.OrderBy(sorting ?? nameof(IdentityRole.Name)) |
|
|
.OrderBy(sorting ?? nameof(IdentityRole.Name)) |
|
|
.As<IMongoQueryable<IdentityRole>>() |
|
|
.As<IMongoQueryable<IdentityRole>>() |
|
|
.PageBy<IdentityRole, IMongoQueryable<IdentityRole>>(skipCount, maxResultCount) |
|
|
.PageBy<IdentityRole, IMongoQueryable<IdentityRole>>(skipCount, maxResultCount) |
|
|
|