Share via


UserManager<TUser>.CreateAsync Method (TUser, String)

Create a user and associates it with the given password (if one is provided)

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

'Declaration
Public Overridable Function CreateAsync ( _
    user As TUser, _
    password As String _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager 
Dim user As TUser
Dim password As String 
Dim returnValue As Task(Of IdentityResult)

returnValue = instance.CreateAsync(user, _
    password)
public virtual Task<IdentityResult> CreateAsync(
    TUser user,
    string password
)
public:
virtual Task<IdentityResult^>^ CreateAsync(
    TUser user, 
    String^ password
)
abstract CreateAsync : 
        user:'TUser * 
        password:string -> Task<IdentityResult> 
override CreateAsync : 
        user:'TUser * 
        password:string -> Task<IdentityResult> 
public function CreateAsync(
    user : TUser, 
    password : String
) : Task<IdentityResult>

Parameters

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>

See Also

Reference

UserManager<TUser> Class

CreateAsync Overload

Microsoft.AspNet.Identity Namespace