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)

public function DbContext(
	objectContext : ObjectContext, 
	dbContextOwnsObjectContext : boolean
)

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: