RoleManager<TRole, TKey>.RoleExistsAsync Method

Indicates a value whether the role exists.

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

Syntax

'Declaration
Public Overridable Function RoleExistsAsync ( _
    roleName As String _
) As Task(Of Boolean)
'Usage
Dim instance As RoleManager 
Dim roleName As String 
Dim returnValue As Task(Of Boolean)

returnValue = instance.RoleExistsAsync(roleName)
public virtual Task<bool> RoleExistsAsync(
    string roleName
)
public:
virtual Task<bool>^ RoleExistsAsync(
    String^ roleName
)
abstract RoleExistsAsync : 
        roleName:string -> Task<bool> 
override RoleExistsAsync : 
        roleName:string -> Task<bool> 
public function RoleExistsAsync(
    roleName : String
) : Task<boolean>

Parameters

Return Value

Type: System.Threading.Tasks.Task<Boolean>
true if the role exists; otherwise, false.

See Also

Reference

RoleManager<TRole, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity