Share via


IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken,TUserPasskey> Class

Definition

Base class for the Entity Framework database context used for identity.

public abstract class IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken,TUserPasskey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey> where TUser : IdentityUser<TKey> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey> where TUserClaim : IdentityUserClaim<TKey> where TUserRole : IdentityUserRole<TKey> where TUserLogin : IdentityUserLogin<TKey> where TRoleClaim : IdentityRoleClaim<TKey> where TUserToken : IdentityUserToken<TKey> where TUserPasskey : IdentityUserPasskey<TKey>
type IdentityDbContext<'User, 'Role, 'Key, 'UserClaim, 'UserRole, 'UserLogin, 'RoleClaim, 'UserToken, 'UserPasskey (requires 'User :> IdentityUser<'Key> and 'Role :> IdentityRole<'Key> and 'Key :> IEquatable<'Key> and 'UserClaim :> IdentityUserClaim<'Key> and 'UserRole :> IdentityUserRole<'Key> and 'UserLogin :> IdentityUserLogin<'Key> and 'RoleClaim :> IdentityRoleClaim<'Key> and 'UserToken :> IdentityUserToken<'Key> and 'UserPasskey :> IdentityUserPasskey<'Key>)> = class
    inherit IdentityUserContext<'User, 'Key, 'UserClaim, 'UserLogin, 'UserToken, 'UserPasskey (requires 'User :> IdentityUser<'Key> and 'Key :> IEquatable<'Key> and 'UserClaim :> IdentityUserClaim<'Key> and 'UserLogin :> IdentityUserLogin<'Key> and 'UserToken :> IdentityUserToken<'Key> and 'UserPasskey :> IdentityUserPasskey<'Key>)>
Public MustInherit Class IdentityDbContext(Of TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken, TUserPasskey)
Inherits IdentityUserContext(Of TUser, TKey, TUserClaim, TUserLogin, TUserToken, TUserPasskey)

Type Parameters

TUser

The type of user objects.

TRole

The type of role objects.

TKey

The type of the primary key for users and roles.

TUserClaim

The type of the user claim object.

TUserRole

The type of the user role object.

TUserLogin

The type of the user login object.

TRoleClaim

The type of the role claim object.

TUserToken

The type of the user token object.

TUserPasskey

The type of the user token object.

Inheritance
IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken,TUserPasskey>

Constructors

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

Initializes a new instance of the class.

IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken,TUserPasskey>(DbContextOptions)

Initializes a new instance of the class.

Properties

RoleClaims

Gets or sets the DbSet<TEntity> of role claims.

Roles

Gets or sets the DbSet<TEntity> of roles.

SchemaVersion

Gets the schema version used for versioning.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)
UserClaims

Gets or sets the DbSet<TEntity> of User claims.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)
UserLogins

Gets or sets the DbSet<TEntity> of User logins.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)
UserPasskeys

Gets or sets the DbSet<TEntity> of User passkeys.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)
UserRoles

Gets or sets the DbSet<TEntity> of User roles.

Users

Gets or sets the DbSet<TEntity> of Users.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)
UserTokens

Gets or sets the DbSet<TEntity> of User tokens.

(Inherited from IdentityUserContext<TUser,TKey,TUserClaim,TUserLogin,TUserToken,TUserPasskey>)

Methods

OnModelCreating(ModelBuilder)

Configures the schema needed for the identity framework.

Applies to