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

適用於