DbContext Constructor (ObjectContext, Boolean)

Entity Framework 5.0

Constructs a new context instance around an existing ObjectContext.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

'Declaration
Public Sub New ( _
	objectContext As ObjectContext, _
	dbContextOwnsObjectContext As Boolean _
)
'Usage
Dim objectContext As ObjectContext 
Dim dbContextOwnsObjectContext As Boolean 

Dim instance As New DbContext(objectContext, _
	dbContextOwnsObjectContext)

Parameters

objectContext
Type: System.Data.Objects.ObjectContext

An existing ObjectContext to wrap the new context.

dbContextOwnsObjectContext
Type: System.Boolean

If set to true the ObjectContext is disposed when the DbContext is disposed, otherwise the caller must dispose the connection.

Show: