Bagikan melalui


IdentityDbContext<TUser,TRole,TKey> Kelas

Definisi

Kelas dasar untuk konteks database Kerangka Kerja Entitas yang digunakan untuk identitas.

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))

Jenis parameter

TUser

Jenis objek pengguna.

TRole

Jenis objek peran.

TKey

Jenis kunci utama untuk pengguna dan peran.

Warisan
IdentityDbContext<TUser,TRole,TKey>
Warisan
Turunan

Konstruktor

IdentityDbContext<TUser,TRole,TKey>()

Menginisialisasi instans baru kelas.

IdentityDbContext<TUser,TRole,TKey>(DbContextOptions)

Menginisialisasi instans baru dari konteks db.

Properti

RoleClaims

Mendapatkan atau menetapkan DbSet<TEntity> klaim peran.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Roles

Mendapatkan atau mengatur DbSet<TEntity> peran.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
SchemaVersion

Mendapatkan versi skema yang digunakan untuk penerapan versi.

(Diperoleh dari IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
UserClaims

Mendapatkan atau mengatur DbSet<TEntity> klaim Pengguna.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserLogins

Mendapatkan atau mengatur DbSet<TEntity> login Pengguna.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserRoles

Mendapatkan atau mengatur DbSet<TEntity> peran Pengguna.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Users

Mendapatkan atau mengatur DbSet<TEntity> Pengguna.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserTokens

Mendapatkan atau mengatur DbSet<TEntity> token Pengguna.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)

Metode

OnModelCreating(ModelBuilder)

Mengonfigurasi skema yang diperlukan untuk kerangka kerja identitas.

(Diperoleh dari IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)

Berlaku untuk