DevForce Help Reference
With<TQuery>(TQuery,EntityManager,QueryStrategy) Method
Example 


Returns a clone of the query with the specified EntityManager and QueryStrategy set.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function With(Of TQuery As IEntityQuery)( _
   ByVal query As TQuery, _
   ByVal em As EntityManager, _
   ByVal qs As QueryStrategy _
) As TQuery
'Usage
 
Dim query As TQuery
Dim em As EntityManager
Dim qs As QueryStrategy
Dim value As TQuery
 
value = EntityQueryExtensions.With(Of TQuery)(query, em, qs)
[Extension()]
public static TQuery With<TQuery>( 
   TQuery query,
   EntityManager em,
   QueryStrategy qs
)
where TQuery: IEntityQuery

Parameters

query
em
qs

Type Parameters

TQuery
Example
var mgr1 = new DomainModelEntityManager();
var query1 = mgr1.Customers.Where(c => c.Country == "UK");

var mgr2 = new DomainModelEntityManager();
var query2 = query1.With(mgr2, QueryStrategy.DataSourceOnly);
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