Interface IRoleService
public interface IRoleService
Methods
AddRoleAsync(Role)
Add / save a new Role to the database.
Task<Role> AddRoleAsync(Role role)
Parameters
role
Role
Returns
- Task<Role>
DeleteRoleAsync(int)
Delete / mark-as-deleted a Role in the database.
Task DeleteRoleAsync(int roleId)
Parameters
roleId
intID-reference of a Role
Returns
- Task
GetRoleAsync(int)
Get one specific Role
Task<Role> GetRoleAsync(int roleId)
Parameters
roleId
intID-reference of a Role
Returns
- Task<Role>
GetRolesAsync(int)
Will exclude global roles which are for all sites. To get those as well, use the overload GetRolesAsync(int, bool)
Task<List<Role>> GetRolesAsync(int siteId)
Parameters
siteId
intID-reference of a Site
Returns
- Task<List<Role>>
GetRolesAsync(int, bool)
Get roles of the Site and optionally include global Roles.
Task<List<Role>> GetRolesAsync(int siteId, bool includeGlobalRoles)
Parameters
siteId
intID-reference to a Site
includeGlobalRoles
boolTrue if it should also include global roles. False will return the same data as just calling GetRolesAsync(int)
Returns
- Task<List<Role>>
UpdateRoleAsync(Role)
Update a Role in the database.
Task<Role> UpdateRoleAsync(Role role)
Parameters
role
Role
Returns
- Task<Role>