Share via


IdentityDbContext Class

Default db context that uses the default entity types

Inheritance Hierarchy

System.Object
  System.Data.Entity.DbContext
    Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext<IdentityUser>
      Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext

Namespace:  Microsoft.AspNet.Identity.EntityFramework
Assembly:  Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)

Syntax

'Declaration
Public Class IdentityDbContext _
    Inherits IdentityDbContext(Of IdentityUser)
'Usage
Dim instance As IdentityDbContext
public class IdentityDbContext : IdentityDbContext<IdentityUser>
public ref class IdentityDbContext : public IdentityDbContext<IdentityUser^>
type IdentityDbContext =  
    class 
        inherit IdentityDbContext<IdentityUser>
    end
public class IdentityDbContext extends IdentityDbContext<IdentityUser>

The IdentityDbContext type exposes the following members.

Constructors

  Name Description
Public method IdentityDbContext() Default constructor which uses the DefaultConnection
Public method IdentityDbContext(String) Constructor which takes the connection string to use

Top

Properties

  Name Description
Public property ChangeTracker (Inherited from DbContext.)
Public property Configuration (Inherited from DbContext.)
Public property Database (Inherited from DbContext.)
Public property Roles (Inherited from IdentityDbContext<TUser>.)
Public property Users (Inherited from IdentityDbContext<TUser>.)

Top

Methods

  Name Description
Public method Dispose() (Inherited from DbContext.)
Protected method Dispose(Boolean) (Inherited from DbContext.)
Public method Entry(Object) (Inherited from DbContext.)
Public method Entry<TEntity>(TEntity) (Inherited from DbContext.)
Public method Equals (Inherited from DbContext.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from DbContext.)
Public method GetType (Inherited from DbContext.)
Public method GetValidationErrors (Inherited from DbContext.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnModelCreating (Inherited from IdentityDbContext<TUser>.)
Public method SaveChanges (Inherited from DbContext.)
Public method SaveChangesAsync() (Inherited from DbContext.)
Public method SaveChangesAsync(CancellationToken) (Inherited from DbContext.)
Public method Set(Type) (Inherited from DbContext.)
Public method Set<TEntity>() (Inherited from DbContext.)
Protected method ShouldValidateEntity (Inherited from DbContext.)
Public method ToString (Inherited from DbContext.)
Protected method ValidateEntity (Inherited from IdentityDbContext<TUser>.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate property IObjectContextAdapter.ObjectContext (Inherited from DbContext.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.AspNet.Identity.EntityFramework Namespace