Thanks for considering a contribution! CaeriusNet is a tightly-scoped, opinionated micro-ORM for C# 14 / .NET 10 / SQL Server, focused on stored procedures, TVPs, and transactions. This document explains how to set up, the conventions we follow, and how to get a PR merged efficiently.
- Code of Conduct
- Quick start
- Project layout
- Branching & commits
- Build, test & coverage
- Coding conventions
- Pull request process
- Reporting bugs / requesting features
- Security
This project follows the Contributor Covenant 2.1. By participating you agree to uphold it.
git clone https://github.com/CaeriusNET/CaeriusNet.git
cd CaeriusNet
dotnet restore CaeriusNet.slnx
dotnet build CaeriusNet.slnx -c Release
dotnet test CaeriusNet.slnx -c Release --filter "FullyQualifiedName!~CaeriusNet.IntegrationTests"Open the repository in VS Code or JetBrains Rider with the Dev Containers extension. The container ships .NET 10, Docker-outside-of-Docker (so Testcontainers works), the GitHub CLI and pre-pulls the SQL Server 2022 image.
# Inside the container — run the full integration suite
dotnet test Tests/CaeriusNet.IntegrationTests/CaeriusNet.IntegrationTests.csproj -c ReleaseSrc/ # Public runtime API (the NuGet package)
SourceGenerators/ # Roslyn incremental generators (DTO, TVP, AutoContracts emission)
Analyzer/ # Roslyn analyzers and user-facing CAERIUS diagnostics
Tests/CaeriusNet.Tests/ # Pure unit tests (no IO)
Tests/CaeriusNet.Generator.Tests/ # Source-generator emit and caching tests
Tests/CaeriusNet.Analyzer.Tests/ # Analyzer diagnostic tests
Tests/CaeriusNet.IntegrationTests/ # End-to-end tests (Testcontainers MSSQL)
Benchmark/ # BenchmarkDotNet suites
Exemples/ # Example consumer apps (directory name retained for compatibility)
Documentations/ # VitePress documentation site
.devcontainer/ # Reproducible dev environment
.github/ # Workflows, templates, issue forms
- Base branch:
main. - Feature branches:
feature/<short-kebab>. - Fix branches:
fix/<short-kebab>. - Chore/docs branches:
chore/<short-kebab>/docs/<short-kebab>.
We use Conventional Commits. Common types:
| Type | When |
|---|---|
feat |
A new public API or behaviour |
fix |
A bug fix |
perf |
A performance improvement (back it with a bench) |
refactor |
Internal change with no external behaviour delta |
test |
Adding or improving tests |
docs |
Documentation only |
chore |
Tooling, CI, dependency updates |
If your change is breaking, append ! (e.g. feat(sproc)!:) and mention the
migration path in the PR description.
| Command | Purpose |
|---|---|
dotnet build CaeriusNet.slnx -c Release -p:TreatWarningsAsErrors=true |
Mirrors CI. |
dotnet test CaeriusNet.slnx -c Release --filter "FullyQualifiedName!~IntegrationTests" |
Unit + generator tests (fast, no Docker). |
dotnet test Tests/CaeriusNet.IntegrationTests |
End-to-end tests; needs Docker. |
pwsh ./.github/scripts/ValidatePackage.ps1 -Configuration Release -OutputDirectory .work/package-validation |
Packs the NuGet package and smoke-tests a consumer project. |
cd Documentations && npm install && npm run docs:build |
Builds the VitePress docs when npm is available; use npm ci if a lockfile exists. |
dotnet test --collect:"XPlat Code Coverage" |
Generates Cobertura coverage. |
Coverage is reported on every PR via the CI workflow. Aim to never decrease
line coverage on Src/ and SourceGenerators/.
- Target framework:
net10.0(no multi-target). - Language version:
latest(C# 14). - Nullable: enabled everywhere.
- Async only. No sync over async; use
ConfigureAwait(false)in library code. - Stored procedures only. Do not introduce inline SQL or query builders.
- No reflection on the hot path. Reach for source generators or
Span<T>/Memory<T>first. sealedby default for both DTOs and helper classes.- Single-responsibility files. One public type per file when practical.
- XML doc comments on every public API (we ship as a NuGet package).
- No new dependencies without prior discussion in an issue.
Static analysis is enforced via TreatWarningsAsErrors=true. Prefer fixing the
root cause over a #pragma warning disable.
- Open an issue first for non-trivial changes so we can align on direction.
- Use a focused branch with the prefix described above.
- Keep PRs small and reviewable. Split refactors from features.
- CI must be green (build, non-integration tests, package validation, CodeQL, dependency review, and docs build when docs changed).
- Run Docker-backed integration tests when storage, transactions, SQL, or TVP behaviour changes.
- Update
CHANGELOG.mdunder the[Unreleased]section. - Update README / docs when public behaviour changes.
- Release PRs must leave clear release notes in the PR or changelog so the manual release workflow can publish a tagged NuGet package with generated or supplied notes.
- At least one approving review is required before merge.
- PRs are squash-merged onto
mainwith a Conventional Commit title.
Use the issue templates — they ask for the minimum context (target framework, SqlClient version, repro snippet) we need to triage quickly.
Please do not report vulnerabilities via public issues. Follow the process in SECURITY.md.