RoleManagerExtensions.FindByName<TRole, TKey> Method (RoleManager<TRole, TKey>, String)

 

Finds a role by name.

Namespace:   Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

public static TRole FindByName<TRole, TKey>(
    this RoleManager<TRole, TKey> manager,
    string roleName
)
where TRole : class, IRole<TKey>
where TKey : object, IEquatable<TKey>
public:
generic<typename TRole, typename TKey>
where TRole : ref class, IRole<TKey>
where TKey : Object, IEquatable<TKey>
[ExtensionAttribute]
static TRole FindByName(
    RoleManager<TRole, TKey>^ manager,
    String^ roleName
)
static member FindByName<'TRole, 'TKey when 'TRole : not struct and IRole<'TKey> when 'TKey : Object and IEquatable<'TKey>> : 
        manager:RoleManager<'TRole, 'TKey> *
        roleName:string -> 'TRole
<ExtensionAttribute>
Public Shared Function FindByName(Of TRole As { Class, IRole(Of TKey) }, TKey As { Object, IEquatable(Of TKey) }) (
    manager As RoleManager(Of TRole, TKey),
    roleName As String
) As TRole

Parameters

Return Value

Type: TRole

The result of the operation.

Type Parameters

  • TRole
    The type of the role.
  • TKey
    The type of the key.

See Also

RoleManagerExtensions Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top