Skip to content

Instantly share code, notes, and snippets.

@waldekmastykarz
Created October 12, 2023 09:00
Show Gist options
  • Save waldekmastykarz/d6eda0d7ae228d6fefd9c1ce5e7eb2b2 to your computer and use it in GitHub Desktop.
Save waldekmastykarz/d6eda0d7ae228d6fefd9c1ce5e7eb2b2 to your computer and use it in GitHub Desktop.
Build Microsoft Graph connector article - ConnectionService.cs
static class ConnectionService
{
async static Task CreateConnection()
{
await GraphService.Client.External.Connections
.PostAsync(ConnectionConfiguration.ExternalConnection);
}
async static Task CreateSchema()
{
await GraphService.Client.External
.Connections[ConnectionConfiguration.ExternalConnection.Id]
.Schema
.PatchAsync(ConnectionConfiguration.Schema);
}
public static async Task ProvisionConnection()
{
await CreateConnection();
await CreateSchema();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment