Returns an object query that, when it is executed, returns the same set of objects that exists in the current collection.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
This property is used to obtain a new instance of ObjectQuery<T> that returns the same set of objects. This is useful as the starting point for a more complex join, union, or filtered query, or to return the same objects in a detached state by using the NoTracking option.
This example is based on a modified version of the School model. This version supports table-per-type inheritance with Course as an abstract type. Complete the Mapping Inheritance - Table-per-Type walkthrough to modify the School model to support the table-per-type inheritance example used in this topic.
This example shows how to use to filter objects in an EntityCollection<TEntity> and bind only to objects of a specific type. For a complete version of this example, see How to: Bind Controls to Derived Types (Entity Framework).
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2