Share via


UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.FindByIdAsync Metodo

Definizione

Trova e restituisce un utente, se presente, che ha l'oggetto specificato userId.

public abstract System.Threading.Tasks.Task<TUser> FindByIdAsync (string userId, System.Threading.CancellationToken cancellationToken = default);
public abstract System.Threading.Tasks.Task<TUser?> FindByIdAsync (string userId, System.Threading.CancellationToken cancellationToken = default);
abstract member FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Public MustOverride Function FindByIdAsync (userId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TUser)

Parametri

userId
String

ID utente da cercare.

cancellationToken
CancellationToken

Oggetto CancellationToken usato per propagare le notifiche di richiesta di annullamento dell'operazione.

Restituisce

Task<TUser>

Oggetto Task che rappresenta l'operazione asincrona contenente l'utente corrispondente all'oggetto specificato userId , se esistente.

Implementazioni

Si applica a