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
DeleteRoleAsync(int)
Delete / mark-as-deleted a Role in the database.
Task DeleteRoleAsync(int roleId)
Parameters
Returns
GetRoleAsync(int)
Get one specific Role
Task<Role> GetRoleAsync(int roleId)
Parameters
Returns
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
Returns
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
UpdateRoleAsync(Role)
Update a Role in the database.
Task<Role> UpdateRoleAsync(Role role)
Parameters
role
Role