共用方式為


IdentityDbContext<TUser,TRole,TKey> 類別

定義

用於身分識別之 Entity Framework 資料庫內容的基類。

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> User 宣告的 。

(繼承來源 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>)

適用於