KnOwl.ControlPlane.Storage.EntityFramework
1.0.3
dotnet add package KnOwl.ControlPlane.Storage.EntityFramework --version 1.0.3
NuGet\Install-Package KnOwl.ControlPlane.Storage.EntityFramework -Version 1.0.3
<PackageReference Include="KnOwl.ControlPlane.Storage.EntityFramework" Version="1.0.3" />
<PackageVersion Include="KnOwl.ControlPlane.Storage.EntityFramework" Version="1.0.3" />
<PackageReference Include="KnOwl.ControlPlane.Storage.EntityFramework" />
paket add KnOwl.ControlPlane.Storage.EntityFramework --version 1.0.3
#r "nuget: KnOwl.ControlPlane.Storage.EntityFramework, 1.0.3"
#:package KnOwl.ControlPlane.Storage.EntityFramework@1.0.3
#addin nuget:?package=KnOwl.ControlPlane.Storage.EntityFramework&version=1.0.3
#tool nuget:?package=KnOwl.ControlPlane.Storage.EntityFramework&version=1.0.3
KnOwl
KnOwl is a set of reusable .NET libraries for designing, versioning, promoting, distributing, and consuming async contract metadata. It gives teams a Control Plane where contracts are authored and released, plus a Runtime surface where deployed contracts can be consumed by running services.
The goal is to keep product hosts thin. Your app owns the executable project, configuration, and EF migrations; KnOwl packages provide the domain model, application services, storage adapters, Razor UI, catalog endpoints, distribution endpoints, and runtime synchronization behavior.
What KnOwl Solves
- Design event and command contracts with versioned payload schemas.
- Model commands with a required request schema and optional reply schema.
- Promote versions through lifecycle states and generate immutable artifacts.
- Distribute deployed artifacts from a Control Plane to one or more Runtime hosts.
- Expose deployed schemas through split event and command catalog endpoints.
- Keep host-specific database migrations outside the reusable NuGet libraries.
Packages
Install only the layer your host needs:
| Package | Purpose |
|---|---|
KnOwl.Contracts |
Shared DTOs for artifacts, delivery, catalog responses, and security. |
KnOwl.ControlPlane |
Control Plane domain model and repository contracts. |
KnOwl.ControlPlane.Application |
Control Plane services for design, lifecycle, artifacts, releases, and delivery. |
KnOwl.ControlPlane.Storage.EntityFramework |
EF Core storage for Control Plane state. |
KnOwl.ControlPlane.WebUI |
Reusable Razor UI for Control Plane hosts. |
KnOwl.ControlPlane.Bootstrap |
ASP.NET Core composition for Control Plane hosts. |
KnOwl.Runtime |
Runtime domain model and repository contracts. |
KnOwl.Runtime.Application |
Runtime catalog, deployment, pull, and security services. |
KnOwl.Runtime.Storage.EntityFramework |
EF Core storage for Runtime state. |
KnOwl.Runtime.WebUI |
Reusable Razor UI for Runtime hosts. |
KnOwl.Runtime.Bootstrap |
ASP.NET Core composition for Runtime hosts. |
All packages target net9.0 and net10.0.
Getting Started
1. Create a Control Plane host
dotnet new web -n MyCompany.Contracts.ControlPlane
cd MyCompany.Contracts.ControlPlane
dotnet add package KnOwl.ControlPlane.Bootstrap
dotnet add package KnOwl.ControlPlane.Storage.EntityFramework
Use the bootstrap package in Program.cs:
using KnOwl.ControlPlane.Bootstrap;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKnOwlControlPlane(
builder.Configuration,
options => options.MigrationsAssembly = typeof(Program).Assembly.GetName().Name);
var app = builder.Build();
app.MapKnOwlControlPlane();
app.Run();
Add configuration:
{
"ConnectionStrings": {
"KnOwlDb": "Server=localhost;Database=KnOwlControlPlane;Trusted_Connection=True;TrustServerCertificate=True"
}
}
Create migrations in the host project:
dotnet ef migrations add InitialKnOwlControlPlane `
--context KnOwlDbContext `
--output-dir Migrations
dotnet ef database update --context KnOwlDbContext
Run the host and open the Control Plane UI. From there you can create data types, custom metadata fields, events, commands, versions, artifacts, runtime environments, runtime nodes, and releases.
2. Create a Runtime host
dotnet new web -n MyCompany.Contracts.Runtime
cd MyCompany.Contracts.Runtime
dotnet add package KnOwl.Runtime.Bootstrap
dotnet add package KnOwl.Runtime.Storage.EntityFramework
Use the runtime bootstrap in Program.cs:
using KnOwl.Runtime.Bootstrap;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKnOwlRuntime(
builder.Configuration,
options => options.MigrationsAssembly = typeof(Program).Assembly.GetName().Name);
var app = builder.Build();
app.MapKnOwlRuntime();
app.Run();
Add configuration:
{
"ConnectionStrings": {
"KnOwlRuntimeDb": "Server=localhost;Database=KnOwlRuntime;Trusted_Connection=True;TrustServerCertificate=True"
},
"Runtime": {
"ArtifactPull": {
"Enabled": true,
"InitialDelaySeconds": 5,
"IntervalSeconds": 30
}
}
}
Create runtime migrations in the host project:
dotnet ef migrations add InitialKnOwlRuntime `
--context KnOwlRuntimeDbContext `
--output-dir Migrations/RuntimeStorage
dotnet ef database update --context KnOwlRuntimeDbContext
3. Connect Runtime to Control Plane
- In the Runtime UI, create a Control Plane connection.
- Generate or import the connection credentials.
- In the Control Plane UI, register the Runtime node and credentials.
- Release deployed artifacts from the Control Plane.
- Let the Runtime pull pending artifacts, or push artifacts to the Runtime delivery endpoint.
The sample hosts show the intended shape:
samples/KnOwl.ControlPlaneHost.Samplesamples/KnOwl.RuntimeHost.Sample
Contract Catalog
Control Plane hosts expose deployed source artifacts only when their artifact status is deployed:
GET /contracts/artifactsGET /contracts/events/{eventKey}/versions/{versionNumber}GET /contracts/commands/{commandKey}/versions/{versionNumber}
Runtime hosts expose deployed local artifacts:
GET /runtime/contracts/artifactsGET /runtime/contracts/events/{eventKey}/versions/{versionNumber}GET /runtime/contracts/commands/{commandKey}/versions/{versionNumber}
Event responses return one artifact. Command responses return both sides of the command version:
{
"commandKey": "inventories.reserve",
"version": "1.0.0",
"requestArtifact": {
"artifactType": "CommandRequest",
"payloadSchema": {}
},
"replyArtifact": {
"artifactType": "CommandReply",
"payloadSchema": {}
}
}
replyArtifact is optional. Request artifacts are required.
Local Development
Build and test:
dotnet restore KnOwl.slnx
dotnet build KnOwl.slnx --no-restore --configuration Release
dotnet test KnOwl.slnx --no-build --configuration Release
Pack the libraries:
Get-ChildItem src -Recurse -Filter *.csproj | ForEach-Object {
dotnet pack $_.FullName --configuration Release -o artifacts/packages
}
Run the distribution end-to-end test. This starts SQL Server in Docker, runs the Control Plane and Runtime samples, and validates SQL Server storage plus push/pull artifact distribution for both target frameworks.
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/run-knowl-distribution-e2e.ps1
Release
The release workflow builds, tests, packs, creates the GitHub release, and publishes NuGet packages. Production releases are driven by .release and CHANGELOG.md.
Current release: 1.0.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- KnOwl.Contracts (>= 1.0.3)
- KnOwl.ControlPlane (>= 1.0.3)
- KnOwl.Runtime (>= 1.0.3)
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.3)
-
net9.0
- KnOwl.Contracts (>= 1.0.3)
- KnOwl.ControlPlane (>= 1.0.3)
- KnOwl.Runtime (>= 1.0.3)
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.7)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on KnOwl.ControlPlane.Storage.EntityFramework:
| Package | Downloads |
|---|---|
|
KnOwl.ControlPlane.Bootstrap
Reusable ASP.NET Core bootstrap composition for KnOwl control plane hosts. |
|
|
KnOwl.ControlPlane.WebUI
Reusable Razor UI components and pages for KnOwl control plane hosts. |
GitHub repositories
This package is not used by any popular GitHub repositories.