共用方式為


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 作業的 。

適用於