Skip to main content

C# and .NET First Verification

The first verification must execute through an ADO.NET provider and reopen the database. A successful generated-library build is necessary but not sufficient.

1. Contract and build​

dotnet build -p:UseSharedCompilation=false
dotnet test -p:UseSharedCompilation=false

Use scoped Assist and compiler diagnostics to confirm that execution receives only trusted context and requires non-empty Comment and Purpose, in either order. Do not search generated library source to discover terminal signatures. Run dotnet test only after adding an application test project and its test dependencies; a successful command without discovered tests proves no behavior.

2. SQLite integration​

Run the shared School SQLite example from a checkout of teaql-io-site:

npm run verify:school -- --language dotnet

The complete .NET application uses the same School model as the other six runtimes. The runner generates and builds the workspace, checks root/constant bootstrap twice, saves a school with an audit reason, then starts a new process to read it back. An independent SQLite checker verifies persisted fields and relationships after every phase. Logs, exit codes and row snapshots are retained under artifacts/school/.

3. Negative gates​

Prove missing comment/purpose, uninitialized context, missing AuditAs, stale version, unknown dynamic fields/operators, forbidden sorts, invalid ranges/offset/page sizes, and trusted-context override attempts are rejected. Compile-time absence of terminals is preferable where type state applies; runtime cases must throw explicit exceptions.

4. Provider SQL​

Capture a masked trace for stable pagination, bound parameters, native COUNT/SUM/GROUP BY, and exact per-parent Top-N across at least two parents. SQLite can use bounded probes instead of window SQL; inspect the selected plan. Rows, record count, facets, and total must share one normalized active filter.

After SQLite, qualify each intended ADO.NET provider independently. SQL Server support is Feature-level only after the same semantic and governance suite passes; loading an ADO.NET assembly alone is not evidence.

5. Optimistic locking and audit​

Load the same entity twice, save the first update with an audit reason, and assert the second save fails as stale. Verify both the immutable runtime mutation event and the separate masked application audit sink.

6. Regeneration​

Add a model field, regenerate from scratch, rebuild and rerun tests. Record SDK, generator/runtime/provider versions, model hash, commands, exit codes, native response, and masked SQL trace.