RoleManager<TRole> Class
Exposes role related api which will automatically save changes to the RoleStore
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.RoleManager<TRole>
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
Public Class RoleManager(Of TRole As IRole) _
Implements IDisposable
'Usage
Dim instance As RoleManager(Of TRole)
public class RoleManager<TRole> : IDisposable
where TRole : IRole
generic<typename TRole>
where TRole : IRole
public ref class RoleManager : IDisposable
type RoleManager<'TRole when 'TRole : IRole> =
class
interface IDisposable
end
JScript does not support generic types and methods.
Type Parameters
- TRole
The RoleManager<TRole> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RoleManager<TRole> | Constructor |
Top
Properties
Name | Description | |
---|---|---|
RoleValidator | Used to validate roles before persisting changes | |
Store | Persistence abstraction that the Manager operates against |
Top
Methods
Name | Description | |
---|---|---|
CreateAsync | Create a role | |
Dispose() | Dispose the store context | |
Dispose(Boolean) | When disposing, actually dipose the store context | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
FindByIdAsync | Find a role by id | |
FindByNameAsync | Find a role by name | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
RoleExistsAsync | Returns true if the role exists | |
ToString | (Inherited from Object.) | |
UpdateAsync | Update an existing role |
Top
Extension Methods
Name | Description | |
---|---|---|
Create<TRole> | Create a role (Defined by RoleManagerExtensions.) | |
FindById<TRole> | Find a role by id (Defined by RoleManagerExtensions.) | |
FindByName<TRole> | Find a role by name (Defined by RoleManagerExtensions.) | |
RoleExists<TRole> | Returns true if the role exists (Defined by RoleManagerExtensions.) | |
Update<TRole> | Update an existing role (Defined by RoleManagerExtensions.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.