RoleStore<TRole,TContext> Class

Definition

Creates a new instance of a persistence store for roles.

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

Type Parameters

TRole

The type of the class representing a role.

TContext

The type of the data context class used to access the store.

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

Constructors

RoleStore<TRole,TContext>(TContext, IdentityErrorDescriber)

Constructs a new instance of RoleStore<TRole,TContext>.

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