IdentityDbContext<TUser,TRole,TKey> 类

定义

用于标识的实体框架数据库上下文的基类。

generic <typename TUser, typename TRole, typename TKey>
 where TUser : IdentityUser<TKey> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey>public ref class IdentityDbContext : Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityDbContext<TUser, TRole, TKey, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserClaim<TKey> ^, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserRole<TKey> ^, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserLogin<TKey> ^, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityRoleClaim<TKey> ^, Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserToken<TKey> ^>
generic <typename TUser, typename TRole, typename TKey>
 where TUser : IdentityUser<TKey> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey>public ref class IdentityDbContext : Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityDbContext<TUser, TRole, TKey, Microsoft::AspNetCore::Identity::IdentityUserClaim<TKey> ^, Microsoft::AspNetCore::Identity::IdentityUserRole<TKey> ^, Microsoft::AspNetCore::Identity::IdentityUserLogin<TKey> ^, Microsoft::AspNetCore::Identity::IdentityRoleClaim<TKey> ^, Microsoft::AspNetCore::Identity::IdentityUserToken<TKey> ^>
public class IdentityDbContext<TUser,TRole,TKey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext<TUser,TRole,TKey,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<TKey>,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<TKey>,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<TKey>,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<TKey>,Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken<TKey>> where TUser : IdentityUser<TKey> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey>
public class IdentityDbContext<TUser,TRole,TKey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext<TUser,TRole,TKey,Microsoft.AspNetCore.Identity.IdentityUserClaim<TKey>,Microsoft.AspNetCore.Identity.IdentityUserRole<TKey>,Microsoft.AspNetCore.Identity.IdentityUserLogin<TKey>,Microsoft.AspNetCore.Identity.IdentityRoleClaim<TKey>,Microsoft.AspNetCore.Identity.IdentityUserToken<TKey>> where TUser : IdentityUser<TKey> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey>
type IdentityDbContext<'User, 'Role, 'Key (requires 'User :> IdentityUser<'Key> and 'Role :> IdentityRole<'Key> and 'Key :> IEquatable<'Key>)> = class
    inherit IdentityDbContext<'User, 'Role, 'Key, IdentityUserClaim<'Key>, IdentityUserRole<'Key>, IdentityUserLogin<'Key>, IdentityRoleClaim<'Key>, IdentityUserToken<'Key> (requires 'User :> IdentityUser<'Key> and 'Role :> IdentityRole<'Key> and 'Key :> IEquatable<'Key>)>
Public Class IdentityDbContext(Of TUser, TRole, TKey)
Inherits IdentityDbContext(Of TUser, TRole, TKey, IdentityUserClaim(Of TKey), IdentityUserRole(Of TKey), IdentityUserLogin(Of TKey), IdentityRoleClaim(Of TKey), IdentityUserToken(Of TKey))

类型参数

TUser

用户对象的类型。

TRole

角色对象的类型。

TKey

用户和角色的主键的类型。

继承
IdentityDbContext<TUser,TRole,TKey>
继承
派生

构造函数

IdentityDbContext<TUser,TRole,TKey>()

初始化此类的新实例。

IdentityDbContext<TUser,TRole,TKey>(DbContextOptions)

初始化数据库上下文的新实例。

属性

RoleClaims

获取或设置 DbSet<TEntity> 角色声明的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Roles

获取或设置 DbSet<TEntity> 角色的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
SchemaVersion

获取用于版本控制的架构版本。

(继承自 IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
UserClaims

获取或设置 DbSet<TEntity> 用户声明的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserLogins

获取或设置 DbSet<TEntity> 用户登录名的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserRoles

获取或设置 DbSet<TEntity> 用户角色的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Users

获取或设置 DbSet<TEntity> Users 的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserTokens

获取或设置 DbSet<TEntity> 用户令牌的 。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)

方法

OnModelCreating(ModelBuilder)

配置标识框架所需的架构。

(继承自 IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)

适用于