Reference for Team Foundation Server SDK
WorkItemStore.Query Method (String)

Executes a query with the provided WIQL string and returns a collection of WorkItem objects.

Namespace: Microsoft.TeamFoundation.WorkItemTracking.Client
Assembly: Microsoft.TeamFoundation.WorkItemTracking.Client (in microsoft.teamfoundation.workitemtracking.client.dll)

Syntax

Visual Basic (Declaration)
Public Function Query ( _
	wiql As String _
) As WorkItemCollection
Visual Basic (Usage)
Dim instance As WorkItemStore
Dim wiql As String
Dim returnValue As WorkItemCollection

returnValue = instance.Query(wiql)
C#
public WorkItemCollection Query (
	string wiql
)
C++
public:
WorkItemCollection^ Query (
	String^ wiql
)
J#
public WorkItemCollection Query (
	String wiql
)
JScript
public function Query (
	wiql : String
) : WorkItemCollection

Parameters

wiql

A query represented as a Work Item Query Language (WIQL) string.

Return Value

Returns a WorkItemCollection of WorkItem objects that are the result of the query.
See Also

Tags :


Community Content

Petro Protsyk
Example of WIQL Query
SELECT [System.Id], [System.WorkItemType], [System.State], [System.AssignedTo], [System.Title]
FROM WorkItems
WHERE [System.TeamProject] = "ProjectName"
ORDER BY [System.WorkItemType], [System.Id]

Tags :

Page view tracker