UserManager<TUser>.CreateAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateAsync(TUser) |
创建后备存储中指定 |
CreateAsync(TUser, String) |
使用给定密码在后备存储区中创建指定的 |
CreateAsync(TUser)
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
创建后备存储中指定 user
且不带密码的 ,作为异步操作。
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ CreateAsync(TUser user);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> CreateAsync (TUser user);
abstract member CreateAsync : 'User -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.CreateAsync : 'User -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function CreateAsync (user As TUser) As Task(Of IdentityResult)
参数
- user
- TUser
要创建的用户。
返回
表示 Task 异步操作的 ,包含 IdentityResult 操作的 。
适用于
CreateAsync(TUser, String)
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
- Source:
- UserManager.cs
使用给定密码在后备存储区中创建指定的 user
,作为异步操作。
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ CreateAsync(TUser user, System::String ^ password);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> CreateAsync (TUser user, string password);
abstract member CreateAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.CreateAsync : 'User * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function CreateAsync (user As TUser, password As String) As Task(Of IdentityResult)
参数
- user
- TUser
要创建的用户。
- password
- String
用户进行哈希和存储的密码。
返回
表示 Task 异步操作的 ,包含 IdentityResult 操作的 。