C# and .NET Quick Start
TeaQL .NET packages are published on NuGet. The generator-selected runtime and newest package can differ; consult Latest Versions and start with the dependency emitted by the generated project.
Before you start
Complete Prepare the Client and Starter Model
first. You need the Cargo-based TeaQL client, your language toolchain, and the
school model saved as models/main.xml. Run the commands below from that
project root. The shared setup explains why cargo teaql is used for every
language.
Generate the library and application
dotnet --info
cargo teaql services
cargo teaql evaluate --input models/
cargo teaql dotnet-lib-core --input models/ --output generated/dotnet-lib-core
cargo teaql dotnet-app-console --input models/ --output generated/dotnet-app-console
Build and test the generated solution with dotnet build and dotnet test from
the generated workspace. Read its application AGENTS.md before writing code.
For exact generated methods, request scoped Assist:
cargo teaql dotnet-assist-query/school --input models/
cargo teaql dotnet-assist-query/school.name --input models/
cargo teaql dotnet-assist-ensure-schema --input models/
The application should install the generated Runtime Module and explicitly ensure schema through the context-aware module entry point. Verify root and constant seeding on first and repeated startup; do not pass only an entity array or rely on hand-written SQL seed. Then test bounded Q queries, loaded E expressions, Checker/Fix, audited create/update, and a readback after restart.
Keep runtime-local example tests on local source dependencies. For a released package claim, rerun the same model in a clean consumer workspace. See .NET First Verification.
Learn through an Order
Follow the Order tutorial for the retained SQLite example: startup, complete reads, an audited quantity/total edit, bounded pages and expected results. Use the Order API usage guide for result shapes and the native troubleshooting table for recovery. The coverage matrix keeps remaining writing and clean-machine packaging gaps visible. Existing runtime pending-release and generator-deployment qualifications remain in place.