共用方式為


UserManager<TUser>.AddLoginAsync(TUser, UserLoginInfo) 方法

定義

將外部 UserLoginInfo 新增至指定的 user

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

參數

user
TUser

要新增登入的使用者。

login
UserLoginInfo

要加入至指定 user 之 的外部 UserLoginInfo

傳回

Task 表示非同步作業,其中包含 IdentityResult 作業的 。

適用於