From db55157b6dd6c20516e6b30d4ed76fa0f92d4a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?alir=C4=B1za=20ad=C4=B1yah=C5=9Fi?= Date: Fri, 13 Oct 2017 14:22:51 +0300 Subject: [PATCH] #109 Remove overloaded method (RoleRepository) --- .../Volo/Abp/Identity/IdentityRoleAppService.cs | 2 +- .../Volo/Abp/Identity/IdentityUserAppService.cs | 1 - .../Volo/Abp/Identity/IIdentityRoleRepository.cs | 3 --- .../Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs | 5 ----- .../Areas/Identity/Views/Users/Index.cshtml | 5 +++-- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs b/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs index 0113ef86ba..99d454bc78 100644 --- a/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs +++ b/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.Identity public async Task> GetAllListAsync() { - var list = await _roleRepository.GetAllListAsync(); + var list = await _roleRepository.GetListAsync(); return ObjectMapper.Map, List>(list); } diff --git a/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 2558b711c4..97b578832b 100644 --- a/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs b/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs index f18ce2edd4..c6033714f8 100644 --- a/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs +++ b/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs @@ -10,8 +10,5 @@ namespace Volo.Abp.Identity Task FindByNormalizedNameAsync(string normalizedRoleName, CancellationToken cancellationToken); Task> GetListAsync(string sorting, int maxResultCount, int skipCount, string filter); - - //TODO: remove after a better design - Task> GetAllListAsync(); } } \ No newline at end of file diff --git a/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs b/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs index 40047101c8..7ab50948e8 100644 --- a/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs +++ b/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs @@ -31,10 +31,5 @@ namespace Volo.Abp.Identity ).OrderBy(sorting ?? nameof(IdentityRole.Name)) .PageBy(skipCount, maxResultCount).ToListAsync(); } - - public async Task> GetAllListAsync() - { - return await GetQueryable().ToListAsync(); - } } } \ No newline at end of file diff --git a/src/Volo.Abp.Identity.Web/Areas/Identity/Views/Users/Index.cshtml b/src/Volo.Abp.Identity.Web/Areas/Identity/Views/Users/Index.cshtml index 051fb34a2a..1ca863d12e 100644 --- a/src/Volo.Abp.Identity.Web/Areas/Identity/Views/Users/Index.cshtml +++ b/src/Volo.Abp.Identity.Web/Areas/Identity/Views/Users/Index.cshtml @@ -1,11 +1,12 @@ @section styles { - + } @section scripts { - + + }