-
Notifications
You must be signed in to change notification settings - Fork 1
Projects
All the examples will assume that you have created a VSO Context
var context = new VsoContext(account, username, password);
Get the team projects in the account (up to 100 projects)
var projects = await context.Projects.ToListAsync();
var project = await context.Projects.Where(x => x.Id == "").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 projects = await context.Projects.Where(x => x.State == ProjectState.WellFormed).ToListAsync();
var projects = await context.Projects.Skip(5).Take(20).ToListAsync();
Get a team project's capabilities to see whether it uses Git or TFVC for source control.
var projects = await context.Projects .Where(x => x.Id == projectId) .Include(Project.CapabilitiesKey) .ToListAsync();
Each team project is in a project collection. Right now, a Visual Studio Team Services account just has one project collection named "DefaultCollection" so you can use that assumption when you call other APIs. You can also look up the collection.
In the current version of Linq2VSO, is it not possible to create data, only consume it