IdentityBuilder.AddRoles<TRole> Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds Role related services for TRole, including IRoleStore, IRoleValidator, and RoleManager.
public:
generic <typename TRole>
where TRole : class virtual Microsoft::AspNetCore::Identity::IdentityBuilder ^ AddRoles();
C#
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
The role type.
The current IdentityBuilder instance.
Product | Versions |
---|---|
ASP.NET Core | 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |