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

Definition

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

public:
 virtual System::Threading::Tasks::Task<bool> ^ IsInRoleAsync(TUser user, System::String ^ 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

The user whose role membership should be checked.

role
String

The name of the role to be checked.

Returns

Task<Boolean>

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

Applies to