Provides extension methods and resource definitions for a .NET Aspire AppHost to configure a ClickHouse resource.
In your AppHost project, install the .NET Aspire ClickHouse Hosting library with NuGet:
dotnet add package ClickHouse.Hosting
Then, in the Program.cs file of AppHost
, add a ClickHouse resource and consume the connection using the following methods:
var db = builder.AddClickHouse("clickhouse")
.AddDatabase("default");
var api = builder.AddProject<Projects.ClickHouse_DemoApi>("api")
.WithReference(db);
Contributions are welcome! Whether you're fixing a bug, adding a new feature, or improving the documentation, please feel free to make a pull request.