共用方式為


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

定義

在使用者存放區中建立指定的 user

public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> CreateAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> CreateAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.CreateAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.CreateAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function CreateAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IdentityResult)
Public Overrides Function CreateAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IdentityResult)

參數

user
TUser

要建立的使用者。

cancellationToken
CancellationToken

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

傳回

Task 表示非同步作業,其中包含 IdentityResult 建立作業的 。

實作

適用於