UserManager<TUser, TKey>.AddLoginAsync Method (TKey, UserLoginInfo)
Associates a login with a user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
public virtual Task<IdentityResult> AddLoginAsync(
TKey userId,
UserLoginInfo login
)
public:
virtual Task<IdentityResult^>^ AddLoginAsync(
TKey userId,
UserLoginInfo^ login
)
abstract AddLoginAsync :
userId:'TKey *
login:UserLoginInfo -> Task<IdentityResult>
override AddLoginAsync :
userId:'TKey *
login:UserLoginInfo -> Task<IdentityResult>
Public Overridable Function AddLoginAsync (
userId As TKey,
login As UserLoginInfo
) As Task(Of IdentityResult)
Parameters
userId
Type: TKeyThe user ID.
login
Type: Microsoft.AspNet.Identity.UserLoginInfoThe user login information.
Return Value
Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
See Also
UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top