IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class
Represents a generic IdentityDbContext base that can be customized with entity types that extend from the base IdentityUserXXX types.
Assembly: Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)
System.Data.Entity.DbContext
Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext
Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext<TUser>
public class IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> : DbContext where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> where TRole : IdentityRole<TKey, TUserRole> where TUserLogin : IdentityUserLogin<TKey> where TUserRole : IdentityUserRole<TKey> where TUserClaim : IdentityUserClaim<TKey>
Type Parameters
- TUser
The type of the user in the identity.
- TRole
The type of the role in the identity.
- TKey
The type of the key in the identity.
- TUserLogin
The type of the user login in the identity.
- TUserRole
The type of the user role in the identity.
- TUserClaim
The type of the user claim in the identity.
| Name | Description | |
|---|---|---|
![]() | IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>() | Initializes a new instance of the IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class. |
![]() | IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>(DbConnection, DbCompiledModel, Boolean) | Initializes a new instance of the IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class. |
![]() | IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>(String) | Initializes a new instance of the IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class using the specified connection string. |
| Name | Description | |
|---|---|---|
![]() | ChangeTracker | (Inherited from DbContext.) |
![]() | Configuration | (Inherited from DbContext.) |
![]() | Database | (Inherited from DbContext.) |
![]() | RequireUniqueEmail | Gets or sets whether to require unique e-mail in validating user identity. |
![]() | Roles | Gets or sets the collection of roles. |
![]() | Users | Gets or sets the collection of users. |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


