RoleStore<TRole,TContext,TKey> RoleStore<TRole,TContext,TKey> RoleStore<TRole,TContext,TKey> Class

Definition

Creates a new instance of a persistence store for roles.

public class RoleStore<TRole,TContext,TKey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole,TContext,TKey,Microsoft.AspNetCore.Identity.IdentityUserRole<TKey>,Microsoft.AspNetCore.Identity.IdentityRoleClaim<TKey>>, IDisposable, Microsoft.AspNetCore.Identity.IQueryableRoleStore<TRole>, Microsoft.AspNetCore.Identity.IRoleClaimStore<TRole>, Microsoft.AspNetCore.Identity.IRoleStore<TRole> where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey>
type RoleStore<'Role, 'Context, 'Key (requires 'Role :> IdentityRole<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key>)> = class
    inherit RoleStore<'Role, 'Context, 'Key, IdentityUserRole<'Key>, IdentityRoleClaim<'Key> (requires 'Role :> IdentityRole<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key>)>
    interface IQueryableRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IDisposable
    interface IRoleClaimStore<'Role (requires 'Role :> IdentityRole<'Key>)>
Public Class RoleStore(Of TRole, TContext, TKey)
Inherits RoleStore(Of TRole, TContext, TKey, IdentityUserRole(Of TKey), IdentityRoleClaim(Of TKey))
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)

Type Parameters

TRole

The type of the class representing a role.

TContext

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

TKey

The type of the primary key for a role.

Inheritance
Derived
Implements

Constructors

RoleStore<TRole,TContext,TKey>(TContext, IdentityErrorDescriber) RoleStore<TRole,TContext,TKey>(TContext, IdentityErrorDescriber) RoleStore<TRole,TContext,TKey>(TContext, IdentityErrorDescriber)

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

Methods

AddClaimAsync(TRole, Claim, CancellationToken) AddClaimAsync(TRole, Claim, CancellationToken) AddClaimAsync(TRole, Claim, CancellationToken)

Adds the claim given to the specified role.

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

Converts the provided id to a strongly typed key object.

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

Converts the provided id to its string representation.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
CreateAsync(TRole, CancellationToken) CreateAsync(TRole, CancellationToken) 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) CreateRoleClaim(TRole, Claim) CreateRoleClaim(TRole, Claim)

Creates a entity representing a role claim.

DeleteAsync(TRole, CancellationToken) DeleteAsync(TRole, CancellationToken) DeleteAsync(TRole, CancellationToken)

Deletes a role from the store as an asynchronous operation.

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

Dispose the stores

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
FindByIdAsync(String, CancellationToken) FindByIdAsync(String, CancellationToken) 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) FindByNameAsync(String, CancellationToken) 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) GetClaimsAsync(TRole, CancellationToken) 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) GetNormalizedRoleNameAsync(TRole, CancellationToken) GetNormalizedRoleNameAsync(TRole, CancellationToken)

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

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
GetRoleIdAsync(TRole, CancellationToken) GetRoleIdAsync(TRole, CancellationToken) 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) GetRoleNameAsync(TRole, CancellationToken) 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) RemoveClaimAsync(TRole, Claim, CancellationToken) RemoveClaimAsync(TRole, Claim, CancellationToken)

Removes the claim given from the specified role.

(Inherited from RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>)
SetNormalizedRoleNameAsync(TRole, String, CancellationToken) SetNormalizedRoleNameAsync(TRole, String, CancellationToken) 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) SetRoleNameAsync(TRole, String, CancellationToken) 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() ThrowIfDisposed() ThrowIfDisposed()

Throws if this class has been disposed.

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

Updates a role in a store as an asynchronous operation.

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

Properties

AutoSaveChanges AutoSaveChanges 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 Context Context

Gets the database context for this store.

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

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

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

A navigation property for the roles the store contains.

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

Applies to