Table of Contents

Plain ASP.NET Core Host Sample

The plain ASP.NET Core host sample is the canonical in-repository validation path for AsiBackbone.

It exists to prove that AsiBackbone integrates with a standard ASP.NET Core application without requiring NetCoreApplicationTemplate or another application template.

For a request/decision/audit walkthrough with representative JSON output, see Reference Deployment: Plain ASP.NET Core Host Evidence.

Location

samples/PlainAspNetCoreHost/

Purpose

The sample demonstrates a minimal host-owned integration path:

HTTP request
  -> host builds policy context
  -> Core evaluates constraints
  -> host decision policy may require acknowledgment
  -> audit residue is written
  -> EF Core ledger record is persisted by the host-owned DbContext

Demonstrated package usage

The sample references the current package projects directly:

  • AsiBackbone.Core
  • AsiBackbone.AspNetCore
  • AsiBackbone.Storage.InMemory
  • AsiBackbone.EntityFrameworkCore

This keeps the sample close to source during development while preserving the same boundary expected from package consumers.

Host-owned infrastructure

The sample owns the web host, DbContext, database provider, connection string, and runtime endpoints.

The AsiBackbone EF Core package contributes model configuration only:

modelBuilder.ApplyAsiBackboneConfigurations();

That is the important boundary: AsiBackbone contributes persistence shape; the host owns infrastructure.

Run the sample

From the repository root:

dotnet run --project samples/PlainAspNetCoreHost/AsiBackbone.Samples.PlainAspNetCoreHost.csproj

Open the sample decision endpoint:

GET /sample/decision

The response shows the governance decision, reason codes, correlation identifier, policy version, policy hash, audit event identifier, and ledger record identifier.

Use the returned correlation identifier to inspect audit records:

GET /sample/audit/{correlationId}
GET /sample/ledger/{correlationId}

Relationship to NetCoreApplicationTemplate

This sample covers issue #12.

NetCoreApplicationTemplate should remain a separate issue #11 documentation path. It is useful as a fuller external local validation app, but it is not required by AsiBackbone.

Recommended boundary statement:

AsiBackbone provides a plain ASP.NET Core sample as the canonical integration baseline. NetCoreApplicationTemplate is documented separately as an optional external validation host for developers who want to test AsiBackbone against a fuller enterprise-style application baseline.

Boundary notes

This sample does not:

  • require NetCoreApplicationTemplate
  • create a second application template
  • implement ASI
  • host AI models
  • execute robotics or physical control flows
  • choose production persistence, migrations, or deployment strategy for consuming applications