DevForce Help Reference
Execute<T>(IEntityQuery<T>) Method
Example 


Execute the query and return typed results.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function Execute(Of T)( _
   ByVal query As IEntityQuery(Of T) _
) As IEnumerable(Of T)
'Usage
 
Dim query As IEntityQuery(Of T)
Dim value As IEnumerable(Of T)
 
value = EntityQueryExtensions.Execute(Of T)(query)
[Extension()]
public static IEnumerable<T> Execute<T>( 
   IEntityQuery<T> query
)

Parameters

query

Type Parameters

T
Remarks
If you call this method in a Silverlight or Windows style application the query must use a cache-only query strategy, since synchronous calls to the EntityServer are not supported in these environments.
Example
DomainModelEntityManager mgr = new DomainModelEntityManager();

var query = mgr.Customers.Where(c => c.Country == "UK");
var customers = query.Execute();
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