UserStore<TUser>.IsInRoleAsync Method

Returns true if the user is in the named role

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

Syntax

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

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

Parameters

Return Value

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

Implements

IUserRoleStore<TUser>.IsInRoleAsync(TUser, String)

See Also

Reference

UserStore<TUser> Class

Microsoft.AspNet.Identity.EntityFramework Namespace