Commit 2cf8a26
committed
Refactor RoleService to use generic IDataSourceService
Refactored `IRoleService` to inherit from `IDataSourceService<ApplicationRoleDto>`, removing custom methods and properties. Replaced `RoleService` with the new `RoleDataSourceService`, which provides caching and data-loading functionality in a reusable manner.
Updated `Roles.razor` and `Users.razor` to use `IDataSourceService<ApplicationRoleDto>` instead of `IRoleService`. Changed `_roles` in `Users.razor` to `IReadOnlyList<ApplicationRoleDto>` to reflect its read-only nature.
Removed explicit `IRoleService` registration in `DependencyInjection.cs` in favor of auto-discovery of `IDataSourceService<T>` implementations. These changes simplify the codebase, reduce duplication, and improve maintainability.1 parent 74cd937 commit 2cf8a26
File tree
6 files changed
+690
-731
lines changed- src
- Application/Common/Interfaces/Identity
- Infrastructure
- Services/Identity
- Server.UI/Pages/Identity
- Roles
- Users
6 files changed
+690
-731
lines changedLines changed: 0 additions & 11 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments