UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.IsInRoleAsync Method (TUser, String)

 

Asynchronously determines whether the user is in the named role.

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

Syntax

public virtual Task<bool> IsInRoleAsync(
    TUser user,
    string roleName
)
public:
virtual Task<bool>^ IsInRoleAsync(
    TUser user,
    String^ roleName
)
abstract IsInRoleAsync : 
        user:'TUser *
        roleName:string -> Task<bool>
override IsInRoleAsync : 
        user:'TUser *
        roleName:string -> Task<bool>
Public Overridable Function IsInRoleAsync (
    user As TUser,
    roleName As String
) As Task(Of Boolean)

Parameters

  • user
    Type: TUser

    The user.

Return Value

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

The task representing the asynchronous operation.

Implements

IUserRoleStore<TUser, TKey>.IsInRoleAsync(TUser, String)

See Also

UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class
Microsoft.AspNet.Identity.EntityFramework Namespace
ASP.NET Identity

Return to top