diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index 580bb356..d7d06ba9 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -55,7 +55,7 @@ namespace AsbCloudInfrastructure services.AddTransient, CrudServiceBase>(); services.AddTransient, CrudServiceBase>(); services.AddTransient, CrudServiceBase>(); - services.AddTransient, CrudServiceBase>(); + services.AddTransient, UserRoleService>(); services.AddTransient, CrudServiceBase>(); services.AddTransient, DrillParamsService>(); diff --git a/AsbCloudInfrastructure/Services/UserRoleService.cs b/AsbCloudInfrastructure/Services/UserRoleService.cs index dbc7050e..dc9226be 100644 --- a/AsbCloudInfrastructure/Services/UserRoleService.cs +++ b/AsbCloudInfrastructure/Services/UserRoleService.cs @@ -23,11 +23,14 @@ namespace AsbCloudInfrastructure.Services cacheDb.GetCachedTable((AsbCloudDbContext)context); } - public override async Task> GetAllAsync(CancellationToken token = default) + public override async Task> GetPageAsync(int skip = 0, + int take = 32, CancellationToken token = default) { - var rolesDtos = await base.GetAllAsync(token); + var rolesDtos = await base.GetPageAsync(skip, take,token); - return rolesDtos.Select(FillUserRoleWithPermissions); + rolesDtos.Items = rolesDtos.Items.Select(FillUserRoleWithPermissions).ToList(); + + return rolesDtos; } public override async Task GetAsync(int id, CancellationToken token = default)