RoleManager<TRole>.FindByNameAsync(String) Method

Definition

Finds the role associated with the specified roleName if any.

public:
 virtual System::Threading::Tasks::Task<TRole> ^ FindByNameAsync(System::String ^ roleName);
public virtual System.Threading.Tasks.Task<TRole> FindByNameAsync (string roleName);
public virtual System.Threading.Tasks.Task<TRole?> FindByNameAsync (string roleName);
abstract member FindByNameAsync : string -> System.Threading.Tasks.Task<'Role (requires 'Role : null)>
override this.FindByNameAsync : string -> System.Threading.Tasks.Task<'Role (requires 'Role : null)>
Public Overridable Function FindByNameAsync (roleName As String) As Task(Of TRole)

Parameters

roleName
String

The name of the role to be returned.

Returns

Task<TRole>

The Task that represents the asynchronous operation, containing the role associated with the specified roleName

Applies to