kiota-samples/get-started/dotnet-dependency-injection
dependabot[bot] bac5bd4a1e
build(deps): bump Microsoft.Kiota.Bundle
Bumps the kiota-dependencies group in /get-started/dotnet-dependency-injection with 1 update: [Microsoft.Kiota.Bundle](https://github.com/microsoft/kiota-dotnet).


Updates `Microsoft.Kiota.Bundle` from 1.13.2 to 1.14.0
- [Release notes](https://github.com/microsoft/kiota-dotnet/releases)
- [Changelog](https://github.com/microsoft/kiota-dotnet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/kiota-dotnet/compare/v1.13.2...v1.14.0)

---
updated-dependencies:
- dependency-name: Microsoft.Kiota.Bundle
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: kiota-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 21:28:52 +00:00
..
GitHub
Properties
KiotaServiceCollectionExtensions.cs
KiotaWithDependencyInjection.csproj build(deps): bump Microsoft.Kiota.Bundle 2024-11-06 21:28:52 +00:00
KiotaWithDependencyInjection.http
Program.cs
README.md
appsettings.Development.json
appsettings.json
dotnet-dependency-injection.sln
github-releases.yml

README.md

Kiota with .NET Dependency Injection

This project is the finished product of tutorial Kiota with .NET Dependency Injection.

Parts of the sample

  • KiotaServiceCollectionExtensions.cs - Extension methods to add Kiota services to the service collection.
  • GitHub/GitHubClientFactory.cs - Factory class to create GitHub clients.
  • Program.cs - Registring the kiota client with all its handlers.

Generate the client

To generate the client, run the following command:

kiota generate -l csharp -d github-releases.yml -c GitHubClient -n GitHub.ApiClient -o ./GitHub

Run the sample

To run the sample, run the following command:

dotnet run

And navigate to https://localhost:{port}/swagger in your browser.