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

Creates a user with the given password.

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

  • user
    Type: TUser
    The user.

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.

See Also

Reference

UserManager<TUser, TKey> Class

CreateAsync Overload

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity