UserManager<TUser, TKey>.FindByIdAsync Method

Finds a user by ID.

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

Syntax

'Declaration
Public Overridable Function FindByIdAsync ( _
    userId As TKey _
) As Task(Of TUser)
'Usage
Dim instance As UserManager 
Dim userId As TKey
Dim returnValue As Task(Of TUser)

returnValue = instance.FindByIdAsync(userId)
public virtual Task<TUser> FindByIdAsync(
    TKey userId
)
public:
virtual Task<TUser>^ FindByIdAsync(
    TKey userId
)
abstract FindByIdAsync : 
        userId:'TKey -> Task<'TUser> 
override FindByIdAsync : 
        userId:'TKey -> Task<'TUser> 
public function FindByIdAsync(
    userId : TKey
) : Task<TUser>

Parameters

  • userId
    Type: TKey
    The user ID.

Return Value

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

See Also

Reference

UserManager<TUser, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity