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).

Methods

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