TQuery
IdeaBlade DevForce 2010 Help Reference
With<TQuery>(TQuery,QueryStrategy) Method
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > With Method : With<TQuery>(TQuery,QueryStrategy) Method



query
qs
Returns a clone of the query with the specified QueryStrategy set.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Overloads Shared Function With(Of TQuery As IEntityQuery)( _
   ByVal query As TQuery, _
   ByVal qs As QueryStrategy _
) As TQuery
Visual Basic (Usage)Copy Code
Dim query As TQuery
Dim qs As QueryStrategy
Dim value As TQuery
 
value = EntityQueryExtensions.With(Of TQuery)(query, qs)
C# 
[ExtensionAttribute()]
public static TQuery With<TQuery>( 
   TQuery query,
   QueryStrategy qs
)
where TQuery: IEntityQuery
C++/CLI 
[ExtensionAttribute()]
public:
static TQuery^ Withgeneric<typename TQuery>
( 
   TQuery^ query,
   QueryStrategy^ qs
) 
where TQuery: IEntityQuery

Parameters

query
qs

Type Parameters

TQuery

Example

C#Copy Code
var mgr1 = new DomainModelEntityManager();
var query1 = mgr1.Customers.Where(c => c.Country == "UK");

var query2 = query1.With(QueryStrategy.CacheOnly);

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.