Skip to main content

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:

  1. .NET Quick Start — prepare the solution, generate the domain project, initialize context, query and save.
  2. .NET First Verification — prove real ADO.NET persistence, governance, optimistic locking, audit and SQL semantics.
  3. .NET Customization — integrate dependency injection, policy, behavior, dynamic input validation, audit sinks and providers.
  4. .NET Business Scenarios — implement relations, aggregates, stable pagination and provider-specific execution.

NuGet coordinates and the public generator target are intentionally deferred until release rather than documented as guessed package names.

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);

Read the freshly generated Request and Entity source before using a method; casing and async suffixes are part of the generated contract.

Verified providers

DatabaseProvider observed in acceptanceFeature status
PostgreSQLNpgsql 10.0.3PASS
MySQLMySqlConnector 2.6.1PASS
SQLiteMicrosoft.Data.Sqlite 8.0.29PASS
SQL ServerMicrosoft SQL Server providerPASS

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.