Created
October 12, 2023 09:00
-
-
Save waldekmastykarz/d6eda0d7ae228d6fefd9c1ce5e7eb2b2 to your computer and use it in GitHub Desktop.
Build Microsoft Graph connector article - ConnectionService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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