Share via


IdentityDbContext<TUser,TRole,TKey> Class

Definition

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

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

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.

Inheritance
IdentityDbContext<TUser,TRole,TKey>
Inheritance
Derived

Constructors

IdentityDbContext<TUser,TRole,TKey>()

Initializes a new instance of the class.

IdentityDbContext<TUser,TRole,TKey>(DbContextOptions)

Initializes a new instance of the db context.

Properties

RoleClaims

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

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Roles

Gets or sets the DbSet<TEntity> of roles.

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
SchemaVersion

Gets the schema version used for versioning.

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

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

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserLogins

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

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserRoles

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

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
Users

Gets or sets the DbSet<TEntity> of Users.

(Inherited from IdentityDbContext<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TRoleClaim,TUserToken>)
UserTokens

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

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

Methods

OnModelCreating(ModelBuilder)

Configures the schema needed for the identity framework.

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

Applies to