UserManager<TUser, TKey>.AddPasswordAsync Method (TKey, String)
Adds a user password only if one does not already exist.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
public virtual Task<IdentityResult> AddPasswordAsync(
TKey userId,
string password
)
public:
virtual Task<IdentityResult^>^ AddPasswordAsync(
TKey userId,
String^ password
)
abstract AddPasswordAsync :
userId:'TKey *
password:string -> Task<IdentityResult>
override AddPasswordAsync :
userId:'TKey *
password:string -> Task<IdentityResult>
Public Overridable Function AddPasswordAsync (
userId As TKey,
password As String
) As Task(Of IdentityResult)
Parameters
userId
Type: TKeyThe user ID.
password
Type: System.StringThe password value.
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