RoleManager<TRole> Class


Exposes role related API 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

  Microsoft.AspNet.Identity.RoleManager<TRole, TKey>


public class RoleManager<TRole> : RoleManager<TRole, string>
where TRole : class, IRole<string>
generic<typename TRole>
where TRole : ref class, IRole<String^>
public ref class RoleManager : RoleManager<TRole, String^>
type RoleManager<'TRole when 'TRole : not struct and IRole<string>> = 
        inherit RoleManager<'TRole, string>
Public Class RoleManager(Of TRole As { Class, IRole(Of String) })
    Inherits RoleManager(Of TRole, String)

Type Parameters

  • TRole
    The type of the role.


Name Description
System_CAPS_pubmethod RoleManager<TRole>(IRoleStore<TRole, String>)

Initializes a new instance of the RoleManager<TRole> class.


Name Description
System_CAPS_pubproperty Roles

Gets the IQueryable of roles if the store is an IQueryableRoleStore.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubproperty RoleValidator

Gets or sets the object used to validate roles before persisting changes.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_protproperty Store

Gets or sets the persistence abstraction that the Manager operates against.(Inherited from RoleManager<TRole, TKey>.)


Name Description
System_CAPS_pubmethod CreateAsync(TRole)

Asynchronously creates a role.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod DeleteAsync(TRole)

Asynchronously deletes a role.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod Dispose()

Releases the resources used by the current instance of the RoleManager<TRole, TKey> class.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_protmethod 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.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod FindByIdAsync(TKey)

Asynchronously finds a role using the specified identifier.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod FindByNameAsync(String)

Asynchronously finds a role by name.(Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod RoleExistsAsync(String)

Indicates a value whether the role exists. (Inherited from RoleManager<TRole, TKey>.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod UpdateAsync(TRole)

Asynchronously updates an existing role.(Inherited from RoleManager<TRole, TKey>.)

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