Sdílet prostřednictvím


UserManager<TUser>.FindByNameAsync(String) Method

Definition

Finds and returns a user, if any, who has the specified user name.

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

Parameters

userName
String

The user name to search for.

Returns

Task<TUser>

The Task that represents the asynchronous operation, containing the user matching the specified userName if it exists.

Applies to