Skip to content

What is CaeriusNet? ​

CaeriusNet is a focused data-access runtime for C# 14, .NET 10, and SQL Server 2022/2025 stored procedures. It lets an application build an explicit stored-procedure command, map rows to static DTO contracts, pass TVPs, use cache policies and execute transactions without a global runtime state.

The boundary ​

CaeriusNet deliberately does not translate LINQ, track entities, create migrations, build ad hoc SQL, or abstract other database engines. Every production command is CommandType.StoredProcedure.

Capabilityv12 behavior
RegistrationAddCaeriusNet through DI; default or keyed database contexts.
MappingStatic ISpMapper<T> contracts, manually written or source generated.
TVPsStatic row writer contract that reuses a record and handles empty input.
ReadsFirst/single cardinality APIs, three materialized forms, or one explicit stream.
Result sets2–10 generated tuple arities with exact result-set validation by default.
CachingMemory, Frozen snapshot and typed Redis policies without global state.
TransactionsOne connection, one transaction, no concurrent commands, deferred invalidations.
ObservabilityBCL ActivitySource and Meter, with stable SQL semantic conventions.

A typical call ​

csharp
var command = new StoredProcedureCommandBuilder("dbo", "usp_Customer_Get")
    .AddParameter("Id", customerId, SqlDbType.Int)
    .Build();

var customer = await database.QuerySingleOrDefaultAsync<Customer>(command, ct);

The chosen method is part of the contract: QuerySingleOrDefaultAsync permits zero or one row; QuerySingleAsync requires exactly one. QueryAsync<T> is materialized even though it returns IEnumerable<T>; StreamAsync<T> is the explicit reader-backed option.

Use CaeriusNet when stored procedures are already your stable data-access boundary. Use a different tool if you need database portability, query translation or entity state tracking.

Next: Install and configure.

Released under the MIT License.