Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataContext.Connection Property

Gets the connection used by the framework.

Namespace:  System.Data.Linq
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public DbConnection Connection { get; }

Property Value

Type: System.Data.Common.DbConnection
The connection used by the framework.

You can use this property to interoperate with relational ADO.NET code.

The returned connection will be closed unless it has been explicitly opened by the user.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft