RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> Classe

Definizione

Crea una nuova istanza di un archivio di persistenza per i ruoli.

generic <typename TRole, typename TContext, typename TKey, typename TUserRole, typename TRoleClaim>
 where TRole : IdentityRole<TKey, TUserRole, TRoleClaim> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey> where TRoleClaim : IdentityRoleClaim<TKey>public ref class RoleStore abstract : IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
generic <typename TRole, typename TContext, typename TKey, typename TUserRole, typename TRoleClaim>
 where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey>gcnew() where TRoleClaim : IdentityRoleClaim<TKey>gcnew()public ref class RoleStore : IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
public abstract class RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> : IDisposable, Microsoft.AspNetCore.Identity.IQueryableRoleStore<TRole>, Microsoft.AspNetCore.Identity.IRoleClaimStore<TRole>, Microsoft.AspNetCore.Identity.IRoleStore<TRole> where TRole : IdentityRole<TKey,TUserRole,TRoleClaim> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey> where TRoleClaim : IdentityRoleClaim<TKey>
public class RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> : 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> where TUserRole : IdentityUserRole<TKey>, new() where TRoleClaim : IdentityRoleClaim<TKey>, new()
type RoleStore<'Role, 'Context, 'Key, 'UserRole, 'RoleClaim (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim> and 'Context :> DbContext and 'Key :> IEquatable<'Key> and 'UserRole :> IdentityUserRole<'Key> and 'RoleClaim :> IdentityRoleClaim<'Key>)> = class
    interface IQueryableRoleStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
    interface IRoleStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
    interface IDisposable
    interface IRoleClaimStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
type RoleStore<'Role, 'Context, 'Key, 'UserRole, 'RoleClaim (requires 'Role :> IdentityRole<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key> and 'UserRole :> IdentityUserRole<'Key> and 'UserRole : (new : unit -> 'UserRole) and 'RoleClaim :> IdentityRoleClaim<'Key> and 'RoleClaim : (new : unit -> 'RoleClaim))> = class
    interface IQueryableRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IDisposable
    interface IRoleClaimStore<'Role (requires 'Role :> IdentityRole<'Key>)>
Public MustInherit Class RoleStore(Of TRole, TContext, TKey, TUserRole, TRoleClaim)
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)
Public Class RoleStore(Of TRole, TContext, TKey, TUserRole, TRoleClaim)
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)

Parametri di tipo

TRole

Tipo della classe che rappresenta un ruolo.

TContext

Tipo della classe del contesto dati utilizzata per accedere all'archivio.

TKey

Tipo della chiave primaria per un ruolo.

TUserRole

Tipo della classe che rappresenta un ruolo utente.

TRoleClaim

Tipo della classe che rappresenta un'attestazione del ruolo.

Ereditarietà
RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>
Derivato
Implementazioni

Costruttori

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

Costruisce una nuova istanza di RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.

Proprietà

AutoSaveChanges

Ottiene o imposta un flag che indica se le modifiche devono essere rese persistenti dopo la chiamata a CreateAsync, UpdateAsync e DeleteAsync.

Context

Ottiene il contesto del database per questo archivio.

ErrorDescriber

Ottiene o imposta l'oggetto IdentityErrorDescriber per qualsiasi errore che si è verificato con l'operazione corrente.

Roles

Proprietà di navigazione per i ruoli contenuti nell'archivio.

Metodi

AddClaimAsync(TRole, Claim, CancellationToken)

Aggiunge l'oggetto claim specificato all'oggetto specificato role.

ConvertIdFromString(String)

Converte l'oggetto fornito id in un oggetto chiave fortemente tipizzato.

ConvertIdToString(TKey)

Converte l'oggetto fornito id nella relativa rappresentazione di stringa.

CreateAsync(TRole, CancellationToken)

Crea un nuovo ruolo in un archivio come operazione asincrona.

CreateRoleClaim(TRole, Claim)

Crea un'entità che rappresenta un'attestazione di ruolo.

DeleteAsync(TRole, CancellationToken)

Elimina un ruolo dall'archivio come operazione asincrona.

Dispose()

Eliminare i negozi

FindByIdAsync(String, CancellationToken)

Trova il ruolo con l'ID specificato come operazione asincrona.

FindByNameAsync(String, CancellationToken)

Trova il ruolo con il nome normalizzato specificato come operazione asincrona.

GetClaimsAsync(TRole, CancellationToken)

Ottiene le attestazioni associate all'oggetto specificato role come operazione asincrona.

GetNormalizedRoleNameAsync(TRole, CancellationToken)

Ottenere il nome normalizzato di un ruolo come operazione asincrona.

GetRoleIdAsync(TRole, CancellationToken)

Ottiene l'ID per un ruolo dall'archivio come operazione asincrona.

GetRoleNameAsync(TRole, CancellationToken)

Ottiene il nome di un ruolo dall'archivio come operazione asincrona.

RemoveClaimAsync(TRole, Claim, CancellationToken)

Rimuove l'oggetto claim specificato dall'oggetto specificato role.

SaveChanges(CancellationToken)

Salva l'archivio corrente.

SetNormalizedRoleNameAsync(TRole, String, CancellationToken)

Impostare il nome normalizzato di un ruolo come operazione asincrona.

SetRoleNameAsync(TRole, String, CancellationToken)

Imposta il nome di un ruolo nell'archivio come operazione asincrona.

ThrowIfDisposed()

Genera un'eccezione se questa classe è stata eliminata.

UpdateAsync(TRole, CancellationToken)

Aggiornamenti un ruolo in un archivio come operazione asincrona.

Si applica a