IdentityDbContext Constructor (DbConnection, DbCompiledModel, Boolean)

Initializes a new instance of the IdentityDbContext 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.

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

Syntax

'Declaration
Public Sub New ( _
    existingConnection As DbConnection, _
    model As DbCompiledModel, _
    contextOwnsConnection As Boolean _
)
'Usage
Dim existingConnection As DbConnection 
Dim model As DbCompiledModel 
Dim contextOwnsConnection As Boolean 

Dim instance As New IdentityDbContext(existingConnection, _
    model, contextOwnsConnection)
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 function IdentityDbContext(
    existingConnection : DbConnection, 
    model : DbCompiledModel, 
    contextOwnsConnection : boolean
)

Parameters

  • contextOwnsConnection
    Type: System.Boolean
    Determines whether the context instance owns a connection. The connection will not be disposed when the context is disposed when this parameter is false.

See Also

Reference

IdentityDbContext Class

IdentityDbContext Overload

Microsoft.AspNet.Identity.EntityFramework Namespace

Other Resources

ASP.NET Identity