Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DbContext Constructor (DbConnection, Boolean)

Entity Framework 5.0

Constructs a new context instance using the existing connection to connect to a database. The connection will not be disposed when the context is disposed.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)
public function DbContext(
	existingConnection : DbConnection, 
	contextOwnsConnection : boolean


Type: System.Data.Common.DbConnection

An existing connection to use for the new context.

Type: System.Boolean

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.