Browse Source

Ordered by creation time by default

pull/21736/head
liangshiwei 2 years ago
parent
commit
afab0ac2cd
  1. 2
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs
  2. 2
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs
  3. 2
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
  4. 2
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs
  5. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs
  6. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs
  7. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
  8. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs
  9. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js
  10. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js
  11. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Applications/EfCoreOpenIddictApplicationRepository.cs
  12. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Scopes/EfCoreOpenIddictScopeRepository.cs
  13. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Applications/MongoOpenIddictApplicationRepository.cs
  14. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Scopes/MongoOpenIddictScopeRepository.cs

2
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs

@ -40,7 +40,7 @@ public class EfCoreIdentityClaimTypeRepository : EfCoreRepository<IIdentityDbCon
u =>
u.Name.Contains(filter)
)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs

@ -119,7 +119,7 @@ public class EfCoreIdentityRoleRepository : EfCoreRepository<IIdentityDbContext,
.WhereIf(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) ||
x.NormalizedName.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}

2
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs

@ -232,7 +232,7 @@ public class EfCoreIdentityUserRepository : EfCoreRepository<IIdentityDbContext,
);
return await query.IncludeDetails(includeDetails)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.UserName) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}

2
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs

@ -53,7 +53,7 @@ public class EfCoreOrganizationUnitRepository
{
return await (await GetDbSetAsync())
.IncludeDetails(includeDetails)
.OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.DisplayName) : sorting)
.OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}

2
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs

@ -49,7 +49,7 @@ public class MongoIdentityClaimTypeRepository : MongoDbRepository<IAbpIdentityMo
u =>
u.Name.Contains(filter)
)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityClaimType.CreationTime) + " desc" : sorting)
.As<IMongoQueryable<IdentityClaimType>>()
.PageBy<IdentityClaimType, IMongoQueryable<IdentityClaimType>>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs

@ -125,7 +125,7 @@ public class MongoIdentityRoleRepository : MongoDbRepository<IAbpIdentityMongoDb
.WhereIf(!filter.IsNullOrWhiteSpace(),
x => x.Name.Contains(filter) ||
x.NormalizedName.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityRole.CreationTime) + " desc" : sorting)
.As<IMongoQueryable<IdentityRole>>()
.PageBy<IdentityRole, IMongoQueryable<IdentityRole>>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs

@ -200,7 +200,7 @@ public class MongoIdentityUserRepository : MongoDbRepository<IAbpIdentityMongoDb
);
return await query
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.UserName) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(IdentityUser.CreationTime) + " desc" : sorting)
.As<IMongoQueryable<IdentityUser>>()
.PageBy<IdentityUser, IMongoQueryable<IdentityUser>>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs

@ -71,7 +71,7 @@ public class MongoOrganizationUnitRepository
CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
.OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.DisplayName) : sorting)
.OrderBy(sorting.IsNullOrEmpty() ? nameof(OrganizationUnit.CreationTime) + " desc" : sorting)
.As<IMongoQueryable<OrganizationUnit>>()
.PageBy<OrganizationUnit, IMongoQueryable<OrganizationUnit>>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js

@ -114,7 +114,7 @@
_dataTable = _$table.DataTable(
abp.libs.datatables.normalizeConfiguration({
order: [[1, 'asc']],
order: [],
searching: false,
processing: true,
serverSide: true,

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js

@ -150,7 +150,7 @@
var _$table = _$wrapper.find('table');
_dataTable = _$table.DataTable(
abp.libs.datatables.normalizeConfiguration({
order: [[1, 'asc']],
order: [],
processing: true,
serverSide: true,
scrollX: true,

2
modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Applications/EfCoreOpenIddictApplicationRepository.cs

@ -24,7 +24,7 @@ public class EfCoreOpenIddictApplicationRepository : EfCoreRepository<IOpenIddic
{
return await (await GetDbSetAsync())
.WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictApplication.ClientId) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictApplication.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}

2
modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Scopes/EfCoreOpenIddictScopeRepository.cs

@ -27,7 +27,7 @@ public class EfCoreOpenIddictScopeRepository : EfCoreRepository<IOpenIddictDbCon
x.Name.Contains(filter) ||
x.DisplayName.Contains(filter) ||
x.Description.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictScope.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictScope.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}

2
modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Applications/MongoOpenIddictApplicationRepository.cs

@ -23,7 +23,7 @@ public class MongoOpenIddictApplicationRepository : MongoDbRepository<OpenIddict
{
return await ((await GetMongoQueryableAsync(cancellationToken)))
.WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictApplication.ClientId) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictApplication.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.As<IMongoQueryable<OpenIddictApplication>>()
.ToListAsync(GetCancellationToken(cancellationToken));

2
modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Scopes/MongoOpenIddictScopeRepository.cs

@ -26,7 +26,7 @@ public class MongoOpenIddictScopeRepository : MongoDbRepository<OpenIddictMongoD
x.Name.Contains(filter) ||
x.DisplayName.Contains(filter) ||
x.Description.Contains(filter))
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictScope.Name) : sorting)
.OrderBy(sorting.IsNullOrWhiteSpace() ? nameof(OpenIddictScope.CreationTime) + " desc" : sorting)
.PageBy(skipCount, maxResultCount)
.As<IMongoQueryable<OpenIddictScope>>()
.ToListAsync(GetCancellationToken(cancellationToken));

Loading…
Cancel
Save