C# and .NET Runtime Guide
For AI-assisted development, use the generated Assist contracts with the TeaQL Agent Kit Harness Engineering workflow.
The .NET target generates C# entities, Request builders, Q and expression APIs, relation metadata,
native aggregates and audited graph persistence. It uses ADO.NET providers while keeping query
semantics aligned with generated Java Requests.
Start here
Use this sequence for a .NET service:
- .NET Quick Start — prepare the solution, generate the domain project, initialize context, query and save.
- .NET First Verification — prove real ADO.NET persistence, governance, optimistic locking, audit and SQL semantics.
- .NET Business Scenarios — implement relations, aggregates, stable pagination and provider-specific execution.
- .NET Customization — integrate dependency injection, policy, behavior, dynamic input validation, audit sinks and providers.
- .NET Debugging and Observability — capture safe SQL evidence and verify Query, Facet, Mutation, telemetry, audit, and tenant guards.
The runtime is published on NuGet, and the generator exposes .NET targets. Consult Latest Versions before choosing between a generated dependency and a newer package release.
Evidence boundary
Use Cross-language Conformance Status for the committed capability/evidence snapshot. The provider table below is dated execution evidence, not a promise that every provider/runtime combination has the same maintenance or support lifetime.
Query and mutation boundary
Generated execution receives only UserContext; provider and data-service dependencies are resolved
from that context.
var orders = await Q.CustomerOrders()
.Comment("Find orders awaiting review")
.Purpose("Prepare the authorized review queue")
.ExecuteForListAsync(context);
There is no (context, service) compatibility overload. Purpose is the transition to the executable
Request state, and a non-empty comment must already exist. Saving requires an audit reason:
order = await order.AuditAs("Approve reviewed order").SaveAsync(context);
Use model-aware Assist for exact generated methods; casing and async suffixes are part of the generated contract. Do not use generated library source as the normal API-discovery path.
Verified providers
| Database | Provider observed in acceptance | Feature status |
|---|---|---|
| PostgreSQL | Npgsql 10.0.3 | PASS |
| MySQL | MySqlConnector 2.6.1 | PASS |
| SQLite | Microsoft.Data.Sqlite 8.0.29 | PASS |
| SQL Server | Microsoft SQL Server provider | PASS |
SQL Server completed the same full Order Search Feature as the core three databases; it is not
classified as persistence-only. Builds should use -p:UseSharedCompilation=false in environments
where the Roslyn shared compiler can remain stuck.