Reputation: 137
i am making a asp.net web form in which i needed all the Projects which are there in TFS after authentication which i have already done by the below code
var collectionUri = new Uri("https://project.visualstudio.com/DefaultCollection");
var credential = new NetworkCredential("username", "password");
var teamProjectCollection = new TfsTeamProjectCollection(collectionUri, credential);
teamProjectCollection.EnsureAuthenticated();
Upvotes: 1
Views: 443
Reputation: 21795
You can simply write a Linq query like this:-
WorkItemStore workItemStore = new WorkItemStore(teamProjectCollection);
var project = (from Project pr in workItemStore.Projects
select pr);
Upvotes: 2