RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為角色建立持續性存放區的新實例。
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)
類型參數
- TRole
代表角色的類別類型。
- TContext
用來存取存放區的資料內容類別別類型。
- TKey
角色的主鍵類型。
- TUserRole
代表使用者角色的類別類型。
- TRoleClaim
代表角色宣告的類別類型。
- 繼承
-
RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>
- 衍生
- 實作
建構函式
RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>(TContext, IdentityErrorDescriber) |
建構 RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> 的新執行個體。 |
屬性
AutoSaveChanges |
取得或設定旗標,指出呼叫 CreateAsync、UpdateAsync 和 DeleteAsync 之後,是否應該保存變更。 |
Context |
取得這個存放區的資料庫內容。 |
ErrorDescriber |
取得或設定 IdentityErrorDescriber 目前作業發生之任何錯誤的 。 |
Roles |
存放區包含之角色的導覽屬性。 |