UserManager<TUser>.SetUserNameAsync(TUser, String) Methode

Definition

Legt das für userName den angegebenen userfest.

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetUserNameAsync(TUser user, System::String ^ userName);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetUserNameAsync (TUser user, string userName);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetUserNameAsync (TUser user, string? userName);
abstract member SetUserNameAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetUserNameAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetUserNameAsync (user As TUser, userName As String) As Task(Of IdentityResult)

Parameter

user
TUser

Der Benutzer, dessen Name festgelegt werden soll.

userName
String

Der festzulegende Benutzername.

Gibt zurück

Die Task-Klasse, die den asynchronen Vorgang darstellt.

Gilt für: