RoleManager<TRole, TKey> Class
Exposes the role related APIs which will automatically save changes to the RoleStore.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.RoleManager<TRole, TKey>
Microsoft.AspNet.Identity.RoleManager<TRole>
Syntax
public class RoleManager<TRole, TKey> : IDisposable
where TRole : class, IRole<TKey>
where TKey : object, IEquatable<TKey>
generic<typename TRole, typename TKey>
where TRole : ref class, IRole<TKey>
where TKey : Object, IEquatable<TKey>
public ref class RoleManager : IDisposable
type RoleManager<'TRole, 'TKey when 'TRole : not struct and IRole<'TKey> when 'TKey : Object and IEquatable<'TKey>> =
class
interface IDisposable
end
Public Class RoleManager(Of TRole As { Class, IRole(Of TKey) }, TKey As { Object, IEquatable(Of TKey) })
Implements IDisposable
Type Parameters
- TRole
The type of the role in the manager.
- TKey
The type of the keys in the manager.
Constructors
Name | Description | |
---|---|---|
RoleManager<TRole, TKey>(IRoleStore<TRole, TKey>) | Initializes a new instance of the RoleManager<TRole, TKey> class. |
Properties
Name | Description | |
---|---|---|
Roles | Gets the IQueryable of roles if the store is an IQueryableRoleStore. |
|
RoleValidator | Gets or sets the object used to validate roles before persisting changes. |
|
Store | Gets or sets the persistence abstraction that the Manager operates against. |
Methods
Name | Description | |
---|---|---|
CreateAsync(TRole) | Asynchronously creates a role. |
|
DeleteAsync(TRole) | Asynchronously deletes a role. |
|
Dispose() | Releases the resources used by the current instance of the RoleManager<TRole, TKey> class. |
|
Dispose(Boolean) | Called by the Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the RoleManager<TRole, TKey> class. |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
FindByIdAsync(TKey) | Asynchronously finds a role using the specified identifier. |
|
FindByNameAsync(String) | Asynchronously finds a role by name. |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
RoleExistsAsync(String) | Indicates a value whether the role exists. |
|
ToString() | (Inherited from Object.) |
|
UpdateAsync(TRole) | Asynchronously updates an existing role. |
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.
See Also
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top