Excalibur.EventSourcing.SqlServer
10.0.0-alpha.10
dotnet add package Excalibur.EventSourcing.SqlServer --version 10.0.0-alpha.10
NuGet\Install-Package Excalibur.EventSourcing.SqlServer -Version 10.0.0-alpha.10
<PackageReference Include="Excalibur.EventSourcing.SqlServer" Version="10.0.0-alpha.10" />
<PackageVersion Include="Excalibur.EventSourcing.SqlServer" Version="10.0.0-alpha.10" />
<PackageReference Include="Excalibur.EventSourcing.SqlServer" />
paket add Excalibur.EventSourcing.SqlServer --version 10.0.0-alpha.10
#r "nuget: Excalibur.EventSourcing.SqlServer, 10.0.0-alpha.10"
#:package Excalibur.EventSourcing.SqlServer@10.0.0-alpha.10
#addin nuget:?package=Excalibur.EventSourcing.SqlServer&version=10.0.0-alpha.10&prerelease
#tool nuget:?package=Excalibur.EventSourcing.SqlServer&version=10.0.0-alpha.10&prerelease
Excalibur.EventSourcing.SqlServer
SQL Server implementation of event sourcing infrastructure for the Excalibur framework.
Part Of
This package is included in the following metapackages:
| Metapackage | Tier | What It Adds |
|---|---|---|
Excalibur.Dispatch.SqlServer |
Starter | + Dispatch core + Outbox + Hosting |
Excalibur.SqlServer |
Complete | + Inbox + Saga + Leader Election + Audit + Compliance + Data |
Tip: Install
Excalibur.SqlServerfor a production-ready SQL Server stack with a single package reference.
Installation
dotnet add package Excalibur.EventSourcing.SqlServer
Features
SqlServerEventStore- Dapper-based event store implementationSqlServerSnapshotStore- SQL Server snapshot persistence- Optimized for high-throughput event streaming
- Connection factory pattern for multi-database scenarios
- AOT-compatible with full Native AOT support
- NO Entity Framework Core dependency
Usage
// Recommended: Builder-integrated registration
services.AddExcalibur(x => x.AddEventSourcing(es =>
{
es.UseSqlServer(options =>
{
options.ConnectionString = connectionString;
options.EventStoreSchema = "events";
});
es.AddRepository<OrderAggregate, Guid>(id => new OrderAggregate(id));
}));
// Alternative: Direct registration
services.AddSqlServerEventSourcing(options =>
{
options.ConnectionString = connectionString;
});
Database Schema
The store does not create its tables at runtime. Provision them before the first append, by
running the scripts shipped inside this package under scripts/:
| Script | Creates | Required |
|---|---|---|
scripts/001_CreateEventStoreSchema.sql |
dbo.EventStoreEvents |
Yes — this is the event store itself |
scripts/002_CreateSnapshotSchema.sql |
dbo.EventStoreSnapshots |
Only if you enable snapshots |
scripts/003_MigrateToMultiTenant.sql |
— | Upgrade only, see below |
scripts/004_MakeEventTenantTotal.sql |
— | Upgrade only, see below |
Both create scripts are guarded, so re-running them against an existing database is a no-op.
Upgrading an existing database
Run these in order; each is guarded and safe to run against a database that is already converged.
003_MigrateToMultiTenant.sql grows a store created before tenancy existed into the current
schema. Without it, an existing deployment fails on the first append with
Invalid column name 'TenantId'.
004_MakeEventTenantTotal.sql then backfills EventStoreEvents.TenantId from NULL to the
reserved __untenanted__ sentinel and makes the column NOT NULL, so an untenanted event is a
value rather than a missing one, and an upgraded database ends up in the same shape as a fresh one.
It is not needed for a fresh install — 001 already creates the column that way. Its pre-flight
step reports any stream version that already holds both a NULL and a literal sentinel row;
resolve those before continuing, because only you can decide which append survives.
Both upgrade scripts rebuild a unique constraint on the system of record, so run them in a maintenance window with the store stopped, against a backup you have restored at least once.
Related Packages
Excalibur.EventSourcing- Core event sourcing abstractionsExcalibur.Data.Abstractions- Data access patterns
License
This project is multi-licensed under:
See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AspNetCore.HealthChecks.SqlServer (>= 9.0.0)
- Ben.Demystifier (>= 0.4.1)
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.12.0)
- Dapper (>= 2.1.72)
- Excalibur.Data.Abstractions (>= 10.0.0-alpha.10)
- Excalibur.Dispatch.Abstractions (>= 10.0.0-alpha.10)
- Excalibur.Dispatch.Serialization.MemoryPack (>= 10.0.0-alpha.10)
- Excalibur.EventSourcing (>= 10.0.0-alpha.10)
- FluentValidation (>= 12.1.1)
- FluentValidation.DependencyInjectionExtensions (>= 12.1.1)
- IdentityModel (>= 7.0.0)
- JsonNet.ContractResolvers (>= 2.0.0)
- Medo.Uuid7 (>= 3.2.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 3.1.0)
- Microsoft.Data.SqlClient (>= 7.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.ObjectPool (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Microsoft.IdentityModel.Tokens (>= 8.17.0)
- NCrontab (>= 3.4.0)
- OpenTelemetry (>= 1.15.3)
- OpenTelemetry.Api (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly (>= 8.6.6)
- System.IdentityModel.Tokens.Jwt (>= 8.17.0)
- System.IO.Hashing (>= 10.0.7)
- System.Threading.RateLimiting (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Excalibur.EventSourcing.SqlServer:
| Package | Downloads |
|---|---|
|
Excalibur.Dispatch.SqlServer
Experience metapackage bundling Excalibur.Dispatch with SQL Server event sourcing and a SQL Server outbox store. Provides a single AddDispatchWithSqlServer() call for the common SQL Server scenario. The outbox stages messages durably; background delivery is opt-in. PRE-RELEASE: the public API is not frozen and may change between pre-release builds. Not recommended for production use. Known issues: https://docs.excalibur-dispatch.dev/docs/known-issues |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-alpha.10 | 66 | 9/6/2026 |
| 10.0.0-alpha.9 | 74 | 8/31/2026 |
| 10.0.0-alpha.8 | 85 | 8/14/2026 |
| 10.0.0-alpha.7 | 76 | 8/13/2026 |
| 10.0.0-alpha.6 | 81 | 8/11/2026 |
| 10.0.0-alpha.5 | 74 | 8/10/2026 |
| 10.0.0-alpha.4 | 70 | 8/10/2026 |
| 3.0.0-alpha.216 | 90 | 6/30/2026 |
| 3.0.0-alpha.215 | 90 | 6/23/2026 |
| 3.0.0-alpha.214 | 85 | 6/23/2026 |
| 3.0.0-alpha.208 | 83 | 6/11/2026 |
| 3.0.0-alpha.207 | 90 | 6/11/2026 |
| 3.0.0-alpha.205 | 90 | 6/10/2026 |
| 3.0.0-alpha.204 | 89 | 6/8/2026 |
| 3.0.0-alpha.203 | 87 | 6/8/2026 |
| 3.0.0-alpha.202 | 78 | 6/8/2026 |
| 3.0.0-alpha.201 | 76 | 6/8/2026 |
| 3.0.0-alpha.199 | 79 | 6/8/2026 |
| 3.0.0-alpha.198 | 83 | 5/28/2026 |
| 3.0.0-alpha.197 | 87 | 5/28/2026 |
Release notes and versioning policy: https://docs.excalibur-dispatch.dev/docs/migration/version-upgrades