You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is sometimes desirable to retrieve a specific set of WorkItems directly by ID if you know the IDs in advance. To do this, use the method in the following example. It takes in a batch collection that specifies the IDs and revisions of the desired WorkItems and a query string that specifies the Fields to page.
public WorkItemCollection Query(BatchReadParameterCollection batchReadParams, string wiql)
This method minimizes the round-trips used for a query, especially if the goal is to get a specific revision of each WorkItem. The following example specifies the series of calls in which you must specify IDs and revisions of work items.
Run a query for the desired WorkItems. This returns a collection of the latest Revisions for the WorkItems.
Open each WorkItem in the returned WorkItemCollection.
For each WorkItem in the returned collection, open the desired Revision from its RevisionCollection.
Steps 1 and 2 earlier require round-trips to the server. For many WorkItems, the number of round-trips increases linearly.
By using the batch read version of the Query, the system returns the collection of specified work item revisions with a constant order of round-trips.
The text was updated successfully, but these errors were encountered:
From Performance Tuning the Work Item Tracking Object Model
The text was updated successfully, but these errors were encountered: