Bagikan melalui


IdentityBuilder.AddRoles<TRole> Metode

Definisi

Menambahkan layanan terkait Peran untuk TRole, termasuk IRoleStore, IRoleValidator, dan 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

Jenis parameter

TRole

Jenis peran.

Mengembalikan

Instans saat ini IdentityBuilder .

Berlaku untuk