ObjectQuery::Context Property
.NET Framework (current version)
Gets the object context associated with this object query.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Property Value
Type: System.Data.Objects::ObjectContext^The ObjectContext associated with this ObjectQuery<T> instance.
The context for the query includes the connection, cache, and metadata. For more information, see Object Services Overview (Entity Framework).
The connection property is mutable and must be set before a query can be executed. For more information, see Managing Connections in Object Services (Entity Framework).
The example in this topic is based on the AdventureWorks Sales Model. The example gets the ObjectContext object associated with this ObjectQuery<T> object.
.NET Framework
Available since 3.5
Available since 3.5
Show: