RoleManager<TRole>.CreateAsync(TRole) 方法

定义

role在持久性存储区中创建指定的。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ CreateAsync(TRole role);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> CreateAsync (TRole role);
abstract member CreateAsync : 'Role -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.CreateAsync : 'Role -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function CreateAsync (role As TRole) As Task(Of IdentityResult)

参数

role
TRole

要创建的角色。

返回

Task<IdentityResult>

表示异步操作的 Task

适用于