DevForce Help Reference
ToQuery<T>(RelatedEntityList<T>) Method
Example 


Returns an EntityQuery which can be used to query for these entities.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function ToQuery(Of T As {Class, IEntity})( _
   ByVal entities As RelatedEntityList(Of T) _
) As EntityQuery(Of T)
'Usage
 
Dim entities As RelatedEntityList(Of T)
Dim value As EntityQuery(Of T)
 
value = EntityQueryExtensions.ToQuery(Of T)(entities)
[Extension()]
public static EntityQuery<T> ToQuery<T>( 
   RelatedEntityList<T> entities
)
where T: class, IEntity

Parameters

entities

Type Parameters

T
Remarks
The EntityQuery returned is built using the EntityKey of each entity in the list. If the list is empty, which it will be if the IsPendingEntityList flag is on, an exception is thrown.
Example
var mgr = new DomainModelEntityManager();

var customer = mgr.Customers.FirstOrNullEntity();
var orders = customer.OrderSummaries;
var query = orders.ToQuery();
Requirements

Target Platforms: 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

See Also

Reference

EntityQueryExtensions Class
EntityQueryExtensions Members
Overload List

Send Feedback