RoleService Class

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Service layer for Role objects.

public static class RoleService
Inheritance:
System.Object → RoleService

Fields

AdministratorsId The Id of the Administrators role (-1).
CreatorsId The Id of the Creators role (-2).
ExternalId The Id of the External role (-3).
InternalId The Id of the Internal role (-4).

Methods

AddMember(int, int?) Adds a User to the specified Role.
Delete(int, bool) Permanently deletes a Role object from the repository.
Get(IEnumerable, bool) Gets a list of Role objects from the repository.
Get(int, bool) Gets a Role object from the repository.
Get(string, bool) Gets a Role object from the repository.
GetMembers(int, UserQuery) Gets the members of the specified Role.
GetRolesForUser(int, bool) Gets the Roles that the User is a member of.
Insert(Role) Inserts a Role object into the repository.
RemoveMember(int, int?) Removes a User from the specified Role.
Restore(int) Restores a trashed Role, i.e. clears the IsTrashed flag.
Search(RoleQuery) Performs a search according to the specified RoleQuery object.
Trash(int) Trashes a Role, i.e. sets the IsTrashed flag.
Update(Role) Updates an existing Role.