IdentityBuilder.AddRoles<TRole> 方法

定义

添加 TRole 的角色相关服务,包括 IRoleStore、IRoleValidator 和 RoleManager。

public:
generic <typename TRole>
 where TRole : class virtual Microsoft::AspNetCore::Identity::IdentityBuilder ^ AddRoles();
public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoles<TRole> () where TRole : class;
abstract member AddRoles : unit -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'Role : null)
override this.AddRoles : unit -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'Role : null)
Public Overridable Function AddRoles(Of TRole As Class) () As IdentityBuilder

类型参数

TRole

角色类型。

返回

当前的 IdentityBuilder 实例。

适用于