Dela via


RoleStore<TRole,TContext,TKey> Class

Definition

Creates a new instance of a persistence store for roles.

generic <typename TRole, typename TContext, typename TKey>
 where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey>public ref class RoleStore : Microsoft::AspNetCore::Identity::EntityFrameworkCore::RoleStore<TRole, TContext, TKey, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserRole<TKey> ^, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityRoleClaim<TKey> ^>, IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
generic <typename TRole, typename TContext, typename TKey>
 where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey>public ref class RoleStore : 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>
public class RoleStore<TRole,TContext,TKey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole,TContext,TKey,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<TKey>,Microsoft.AspNetCore.Identity.EntityFrameworkCore.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>
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
RoleStore<TRole,TContext,TKey,IdentityUserRole<TKey>,IdentityRoleClaim<TKey>>
RoleStore<TRole,TContext,TKey>
Inheritance
RoleStore<TRole,TContext,TKey,IdentityUserRole<TKey>,IdentityRoleClaim<TKey>>
RoleStore<TRole,TContext,TKey>
Derived
Implements

Constructors

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

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

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.

CreateRoleClaim(TRole, Claim)

Creates an entity representing a role claim.

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