共用方式為


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindByEmailAsync 方法

定義

取得使用者,如果有的話,與指定的標準化電子郵件地址相關聯。

public virtual System.Threading.Tasks.Task<TUser> FindByEmailAsync (string normalizedEmail, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task<TUser> FindByEmailAsync (string normalizedEmail, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task<TUser?> FindByEmailAsync (string normalizedEmail, System.Threading.CancellationToken cancellationToken = default);
abstract member FindByEmailAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<'Key, 'UserClaim, 'UserRole, 'UserLogin>)>
override this.FindByEmailAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<'Key, 'UserClaim, 'UserRole, 'UserLogin>)>
override this.FindByEmailAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Public Overridable Function FindByEmailAsync (normalizedEmail As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TUser)
Public Overrides Function FindByEmailAsync (normalizedEmail As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TUser)

參數

normalizedEmail
String

要為其傳回使用者的標準化電子郵件地址。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

Task<TUser>

工作物件,其中包含非同步查閱作業的結果,如果有任何與指定正規化電子郵件地址相關聯的使用者。

實作

適用於