From 4e3c647c29608ac4e04a73e111b31386d386efc2 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Tue, 4 Feb 2020 13:35:34 +0300 Subject: [PATCH] IIdentityRoleRepository fixes --- .../Volo/Abp/Identity/IIdentityRoleRepository.cs | 1 + .../EntityFrameworkCore/EfCoreIdentityRoleRepository.cs | 5 +++-- .../Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs index ce8c07d22b..3a344b3140 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs @@ -23,6 +23,7 @@ namespace Volo.Abp.Identity ); Task> GetDefaultOnesAsync( + bool includeDetails = false, CancellationToken cancellationToken = default ); } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs index d61da8d90e..2abb9e7a2e 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs @@ -42,9 +42,10 @@ namespace Volo.Abp.Identity.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); } - public virtual async Task> GetDefaultOnesAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetDefaultOnesAsync( + bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet.Where(r => r.IsDefault).ToListAsync(cancellationToken: cancellationToken); + return await DbSet.Where(r => r.IsDefault).ToListAsync(GetCancellationToken(cancellationToken)); } public override IQueryable WithDetails() diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs index ac55012312..af5d288fa1 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs @@ -44,9 +44,10 @@ namespace Volo.Abp.Identity.MongoDB .ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false); } - public virtual async Task> GetDefaultOnesAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetDefaultOnesAsync( + bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(r => r.IsDefault).ToListAsync(cancellationToken: cancellationToken); + return await GetMongoQueryable().Where(r => r.IsDefault).ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); } } } \ No newline at end of file