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 创建操作的 。

实现

适用于