![]() |
VOOZH | about |
dotnet add package Kontent.Ai.Delivery.Extensions.DependencyInjection --version 18.3.0
NuGet\Install-Package Kontent.Ai.Delivery.Extensions.DependencyInjection -Version 18.3.0
<PackageReference Include="Kontent.Ai.Delivery.Extensions.DependencyInjection" Version="18.3.0" />
<PackageVersion Include="Kontent.Ai.Delivery.Extensions.DependencyInjection" Version="18.3.0" />Directory.Packages.props
<PackageReference Include="Kontent.Ai.Delivery.Extensions.DependencyInjection" />Project file
paket add Kontent.Ai.Delivery.Extensions.DependencyInjection --version 18.3.0
#r "nuget: Kontent.Ai.Delivery.Extensions.DependencyInjection, 18.3.0"
#:package Kontent.Ai.Delivery.Extensions.DependencyInjection@18.3.0
#addin nuget:?package=Kontent.Ai.Delivery.Extensions.DependencyInjection&version=18.3.0Install as a Cake Addin
#tool nuget:?package=Kontent.Ai.Delivery.Extensions.DependencyInjection&version=18.3.0Install as a Cake Tool
👁 Build & Test
👁 codecov
👁 Stack Overflow
👁 Discord
| Paradigm | Package | Downloads | Compatibility | Documentation |
|---|---|---|---|---|
| Async | 👁 NuGet |
👁 NuGet |
net8.0 |
|
| Reactive | 👁 NuGet |
👁 NuGet |
net8.0 |
The Kontent.ai Delivery .NET SDK is a client library that lets you easily retrieve content from Kontent.ai.
Installation via Package Manager Console in Visual Studio:
PM> Install-Package Kontent.Ai.Delivery
Installation via .NET CLI:
> dotnet add <TARGET PROJECT> package Kontent.Ai.Delivery
To retrieve content from your Kontent.ai environments, you'll be using an implementation of the IDeliveryClient interface. This is the main interface of the SDK. Here's how you can instantiate and use the Delivery client either with DI/IoC or without DI/IoC.
Startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddDeliveryClient(Configuration);
}
HomeController.cs
public class HomeController
{
private IDeliveryClient _client;
public HomeController(IDeliveryClient deliveryClient)
{
_client = deliveryClient;
}
}
In this case, the SDK reads the configuration from the DeliveryOptions section of the Configuration object. There are many ways of providing the configuration to the DeliveryClient as well as many advanced registration scenarios which you can all find in the .
To see a complete working example, go to one of our sample apps:
To spin up a fully configured blank site quickly, use the:
You can also set up a DeliveryOptions manually using the DeliveryClientBuilder.
IDeliveryClient _client = DeliveryClientBuilder
.WithOptions(builder => builder
.WithEnvironmentId("<YOUR_ENVIRONMENT_ID>")
.UseProductionApi()
.Build())
.Build();
Use the .NET code generator to generate POCO models:
public class Article
{
public string Title { get; set; }
public string Summary { get; set; }
public string Body { get; set; }
public DateTime? PostDate { get; set; }
public ContentItemSystemAttributes System { get; set; }
}
Call the IDeliveryClient to retrieve data from Kontent:
// Retrieving a single content item
var response = await _client.GetItemAsync<Article>("<article_codename>");
var title = response.Item.Title; // -> "On Roasts"
var lang = response.Item.System.Language; // -> "en-US"
See to learn how to generate models and adjust the logic to your needs.
For more developer resources, visit:
Check out the Contributing page to see the best places to file issues, start discussions, and begin contributing.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 18.3.0 | 5,366 | 7/14/2025 |
| 18.2.0 | 6,616 | 4/9/2025 |
| 18.1.1 | 1,075 | 1/20/2025 |
| 18.1.0 | 26,096 | 3/6/2024 |
| 18.0.0 | 261 | 2/27/2024 |
| 17.9.0 | 20,384 | 12/12/2023 |
| 17.8.0 | 4,053 | 10/31/2023 |
| 17.7.0 | 4,637 | 8/4/2023 |
| 17.7.0-beta.0 | 204 | 5/9/2023 |
| 17.6.0 | 5,723 | 4/21/2023 |
| 17.5.0 | 3,990 | 3/16/2023 |
| 17.4.0 | 439 | 3/9/2023 |
| 17.3.0 | 1,768 | 3/2/2023 |
| 17.2.0 | 5,596 | 2/2/2023 |
| 17.2.0-beta.1 | 231 | 1/19/2023 |
| 17.1.0 | 4,419 | 1/9/2023 |
| 17.0.1 | 594 | 11/10/2022 |
| 17.0.0 | 1,409 | 8/3/2022 |
| 17.0.0-beta.2 | 273 | 7/29/2022 |
| 17.0.0-beta.1 | 258 | 7/28/2022 |