UserManager<TUser>.IsInRoleAsync(TUser, String) UserManager<TUser>.IsInRoleAsync(TUser, String) UserManager<TUser>.IsInRoleAsync(TUser, String) Method

Definition

Returns a flag indicating whether the specified user is a member of the give named role.

public virtual System.Threading.Tasks.Task<bool> IsInRoleAsync (TUser user, string role);
abstract member IsInRoleAsync : 'User * string -> System.Threading.Tasks.Task<bool>
override this.IsInRoleAsync : 'User * string -> System.Threading.Tasks.Task<bool>
Public Overridable Function IsInRoleAsync (user As TUser, role As String) As Task(Of Boolean)

Parameters

user
TUser TUser TUser

The user whose role membership should be checked.

role
String String String

The name of the role to be checked.

Returns

The Task that represents the asynchronous operation, containing a flag indicating whether the specified user is a member of the named role.

Applies to