RoleStore<TRole,TContext> 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为角色创建持久性存储的新实例。
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 : DbContexttype 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)类型参数
- TRole
表示角色的类的类型。
- TContext
用于访问存储的数据上下文类的类型。
- 继承
- 
				RoleStore<TRole,TContext>
- 继承
- 
				RoleStore<TRole,TContext>
构造函数
| RoleStore<TRole,TContext>(TContext, IdentityErrorDescriber) | 构造 RoleStore<TRole,TContext> 的新实例。 | 
属性
| AutoSaveChanges | 获取或设置一个标志,该标志指示在调用 CreateAsync、UpdateAsync 和 DeleteAsync 后是否应保留更改。(继承自 RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>) | 
| Context | 获取此存储的数据库上下文。(继承自 RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>) | 
| ErrorDescriber | 获取或设置 IdentityErrorDescriber 当前操作发生的任何错误的 。(继承自 RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>) | 
| Roles | 存储区包含的角色的导航属性。(继承自 RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>) |