Dela via


RoleStore<TRole> Class

Definition

Creates a new instance of a persistence store for roles.

generic <typename TRole>
 where TRole : IdentityRole<System::String ^>public ref class RoleStore : Microsoft::AspNetCore::Identity::EntityFrameworkCore::RoleStore<TRole, Microsoft::EntityFrameworkCore::DbContext ^, System::String ^>
public class RoleStore<TRole> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole,Microsoft.EntityFrameworkCore.DbContext,string> where TRole : IdentityRole<string>
type RoleStore<'Role (requires 'Role :> IdentityRole<string>)> = class
    inherit RoleStore<'Role, DbContext, string (requires 'Role :> IdentityRole<string>)>
Public Class RoleStore(Of TRole)
Inherits RoleStore(Of TRole, DbContext, String)

Type Parameters

TRole

The type of the class representing a role

Inheritance
RoleStore<TRole,TContext,TKey,IdentityUserRole<TKey>,IdentityRoleClaim<TKey>>
RoleStore<TRole>
Inheritance
RoleStore<TRole,TContext,TKey,IdentityUserRole<TKey>,IdentityRoleClaim<TKey>>
RoleStore<TRole>

Constructors

RoleStore<TRole>(DbContext, IdentityErrorDescriber)

Constructs a new instance of RoleStore<TRole>.

Properties

AutoSaveChanges

Gets or sets a flag indicating if changes should be persisted after CreateAsync, UpdateAsync and DeleteAsync are called.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
Context

Gets the database context for this store.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
ErrorDescriber

Gets or sets the IdentityErrorDescriber for any error that occurred with the current operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
Roles

A navigation property for the roles the store contains.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)

Methods

AddClaimAsync(TRole, Claim, CancellationToken)

Adds the claim given to the specified role.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
ConvertIdFromString(String)

Converts the provided id to a strongly typed key object.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
ConvertIdToString(TKey)

Converts the provided id to its string representation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
CreateAsync(TRole, CancellationToken)

Creates a new role in a store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
CreateRoleClaim(TRole, Claim)

Creates a entity representing a role claim.

(Inherited from RoleStore<TRole,TContext,TKey>)
DeleteAsync(TRole, CancellationToken)

Deletes a role from the store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
Dispose()

Dispose the stores

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
FindByIdAsync(String, CancellationToken)

Finds the role who has the specified ID as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
FindByNameAsync(String, CancellationToken)

Finds the role who has the specified normalized name as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
GetClaimsAsync(TRole, CancellationToken)

Get the claims associated with the specified role as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
GetNormalizedRoleNameAsync(TRole, CancellationToken)

Get a role's normalized name as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
GetRoleIdAsync(TRole, CancellationToken)

Gets the ID for a role from the store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
GetRoleNameAsync(TRole, CancellationToken)

Gets the name of a role from the store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
RemoveClaimAsync(TRole, Claim, CancellationToken)

Removes the claim given from the specified role.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
SaveChanges(CancellationToken)

Saves the current store.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
SetNormalizedRoleNameAsync(TRole, String, CancellationToken)

Set a role's normalized name as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
SetRoleNameAsync(TRole, String, CancellationToken)

Sets the name of a role in the store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
ThrowIfDisposed()

Throws if this class has been disposed.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
UpdateAsync(TRole, CancellationToken)

Updates a role in a store as an asynchronous operation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)

Applies to