Share via


IdentityDbContext<TUser> Constructor

 

Initializes a new instance of the IdentityDbContext<TUser> class.

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

Overload List

Name Description
System_CAPS_pubmethod IdentityDbContext<TUser>()

Initializes a new instance of the IdentityDbContext<TUser> class which uses the DefaultConnection.

System_CAPS_pubmethod IdentityDbContext<TUser>(DbConnection, DbCompiledModel, Boolean)

Initializes a new instance of the IdentityDbContext<TUser> class using the existing connection to connect to a database, and initializes it from the given model. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.

System_CAPS_pubmethod IdentityDbContext<TUser>(String)

Initializes a new instance of the IdentityDbContext<TUser> class which takes the connection string to use.

System_CAPS_pubmethod IdentityDbContext<TUser>(String, Boolean)

Initializes a new instance of the IdentityDbContext<TUser> class which takes the connection string to use.

See Also

IdentityDbContext<TUser> Class
Microsoft.AspNet.Identity.EntityFramework Namespace
ASP.NET Identity

Return to top

IdentityDbContext<TUser> Constructor ()

Initializes a new instance of the IdentityDbContext<TUser> class which uses the DefaultConnection.

Syntax

public IdentityDbContext()
public:
IdentityDbContext()
new : unit -> IdentityDbContext
Public Sub New

See Also

ASP.NET Identity

Return to top

IdentityDbContext<TUser> Constructor (DbConnection, DbCompiledModel, Boolean)

Initializes a new instance of the IdentityDbContext<TUser> class using the existing connection to connect to a database, and initializes it from the given model. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.

Syntax

public IdentityDbContext(
    DbConnection existingConnection,
    DbCompiledModel model,
    bool contextOwnsConnection
)
public:
IdentityDbContext(
    DbConnection^ existingConnection,
    DbCompiledModel^ model,
    bool contextOwnsConnection
)
new : 
        existingConnection:DbConnection *
        model:DbCompiledModel *
        contextOwnsConnection:bool -> IdentityDbContext
Public Sub New (
    existingConnection As DbConnection,
    model As DbCompiledModel,
    contextOwnsConnection As Boolean
)

Parameters

  • contextOwnsConnection
    Type: System.Boolean

    Determines whether the context owns a connection. The connection will not be disposed when the context is disposed when this parameter is false.

See Also

ASP.NET Identity

Return to top

IdentityDbContext<TUser> Constructor (String)

Initializes a new instance of the IdentityDbContext<TUser> class which takes the connection string to use.

Syntax

public IdentityDbContext(
    string nameOrConnectionString
)
public:
IdentityDbContext(
    String^ nameOrConnectionString
)
new : 
        nameOrConnectionString:string -> IdentityDbContext
Public Sub New (
    nameOrConnectionString As String
)

Parameters

  • nameOrConnectionString
    Type: System.String

    The name or connection string.

See Also

ASP.NET Identity

Return to top

IdentityDbContext<TUser> Constructor (String, Boolean)

Initializes a new instance of the IdentityDbContext<TUser> class which takes the connection string to use.

Syntax

public IdentityDbContext(
    string nameOrConnectionString,
    bool throwIfV1Schema
)
public:
IdentityDbContext(
    String^ nameOrConnectionString,
    bool throwIfV1Schema
)
new : 
        nameOrConnectionString:string *
        throwIfV1Schema:bool -> IdentityDbContext
Public Sub New (
    nameOrConnectionString As String,
    throwIfV1Schema As Boolean
)

Parameters

  • nameOrConnectionString
    Type: System.String

    The name or connection string.

  • throwIfV1Schema
    Type: System.Boolean

    Determines whether to throw an exception if the schema matches that of Identity 1.0.0.

See Also

ASP.NET Identity

Return to top