UserManager<TUser>.SetPhoneNumberAsync(TUser, String) 方法

定义

设置指定 user的电话号码。

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

参数

user
TUser

要设置其电话号码的用户。

phoneNumber
String

要设置的电话号码。

返回

表示 Task 异步操作的 ,包含 IdentityResult 操作的 。

适用于