Share via


IUserRoleStore<TUser>.IsInRoleAsync Method

Returns true if a user is in a role

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

Syntax

'Declaration
Function IsInRoleAsync ( _
    user As TUser, _
    role As String _
) As Task(Of Boolean)
'Usage
Dim instance As IUserRoleStore 
Dim user As TUser
Dim role As String 
Dim returnValue As Task(Of Boolean)

returnValue = instance.IsInRoleAsync(user, _
    role)
Task<bool> IsInRoleAsync(
    TUser user,
    string role
)
Task<bool>^ IsInRoleAsync(
    TUser user, 
    String^ role
)
abstract IsInRoleAsync : 
        user:'TUser * 
        role:string -> Task<bool> 
function IsInRoleAsync(
    user : TUser, 
    role : String
) : Task<boolean>

Parameters

Return Value

Type: System.Threading.Tasks.Task<Boolean>

See Also

Reference

IUserRoleStore<TUser> Interface

Microsoft.AspNet.Identity Namespace