This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Delta is a .NET library that implements HTTP 304 Not Modified responses using database change tracking. It generates ETags from {AssemblyWriteTime}-{DbTimeStamp}-{OptionalSuffix} to enable browser caching. Published as three NuGet packages: Delta (core), Delta.EF (Entity Framework), Delta.SqlServer.
dotnet build src
dotnet test src
# Run a single test
dotnet test src/DeltaTests --filter "FullyQualifiedName~TestName"
dotnet test src/Delta.EFTests --filter "FullyQualifiedName~TestName"Requires .NET SDK 10.0.103 (preview), pinned in src/global.json.
Three library projects under src/:
- Delta/ — Core middleware (
UseDelta()) for rawDbConnection. Handles ETag calculation, cache headers, and 304 responses. Targets net8.0/net9.0/net10.0. - Delta.EF/ — Entity Framework wrapper (
UseDelta<TDbContext>()). Targets net10.0 only. - Delta.SqlServer/ — SQL Server-specific change tracking queries. Targets net8.0/net9.0/net10.0.
Key source files:
DeltaExtensions_Middleware.cs— Request pipeline integrationDeltaExtensions_Shared.cs— ETag building, cache control logicDeltaExtensions_Sql.cs— Database timestamp retrieval (Delta and Delta.SqlServer each have their own)DeltaExtensions_ConnectionDiscovery.cs— Auto-discovers DbConnection from DI
Four web application projects serve as integration test fixtures (SqlServer, SqlServerEF, Postgres, PostgresEF).
- Framework: NUnit with Verify (snapshot/golden-file testing)
- Database: LocalDb for SQL Server tests, PostgreSQL for Postgres tests
- Snapshot
.verified.files live alongside tests — update withdotnet testafter intentional output changes EfLocalDbused for EF test database setup
TreatWarningsAsErrors: truewith Roslyn/ReSharper style enforcement at build timeEnforceCodeStyleInBuild: true— style violations fail the buildLangVersion: preview— C# preview features are used- Centralized package versions in
src/Directory.Packages.props
README and docs are auto-generated by MarkdownSnippets from readme.source.md and docs/mdsource/. Code snippets in Usage.cs test files are included in docs. Do not edit readme.md or files in docs/ directly — edit the .source.md files instead.