-
Notifications
You must be signed in to change notification settings - Fork 1
Teams
All the examples will assume that you have created a VSO Context
var context = new VsoContext(account, username, password);
Get the teams for a given projects in the account (up to 100)
var teams = await context.Teams.Where(x => x.ProjectId == project.Id).ToListAsync();
var teams = await context.Teams.Where(x => x.ProjectId == project.Id).Skip(100).Take(25).ToListAsync();
var team = await context.Teams.Where(x => x.ProjectId == project.Id && x.Id == "teamID").FirstOrDefaultAsync();
Note that the example uses a "Where" clause to filter and then a "FirstOrDefaultAsync()" to get the first element. This is due the current implementation of "FirstOrDefaultAsync".
var teamembers = await context.TeamMembers.Where(x => x.ProjectId == project.Id && x.TeamId == team.Id).ToListAsync();