Class RoleStore
SQL Server implementation of the role store, managing application roles and their metadata.
Implements
Inherited Members
Namespace: DataWeb.Identity.SqlServer
Assembly: DataWeb.Data.SqlServer.dll
Syntax
public class RoleStore : IRoleStore
Remarks
Provides methods to retrieve application roles from the Sys_Roles table, including:
- All available roles with their identifiers and names
- Role data organized by section structure
- Results ordered by position for consistent UI presentation
Constructors
RoleStore(ISqlHelper)
SQL Server implementation of the role store, managing application roles and their metadata.
Declaration
public RoleStore(ISqlHelper sqlHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| ISqlHelper | sqlHelper |
Remarks
Provides methods to retrieve application roles from the Sys_Roles table, including:
- All available roles with their identifiers and names
- Role data organized by section structure
- Results ordered by position for consistent UI presentation
Properties
Name
Gets the name of the store implementation.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetRolesAsync(CancellationToken)
Retrieves all available application roles ordered by position.
Declaration
public Task<IEnumerable<RoleData>> GetRolesAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Cancellation token for the async operation. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<RoleData>> | An enumerable collection of RoleData objects containing IdMaster and Name properties. |