EventStoreCore.Sqlite
1.0.2-beta.2
dotnet add package EventStoreCore.Sqlite --version 1.0.2-beta.2
NuGet\Install-Package EventStoreCore.Sqlite -Version 1.0.2-beta.2
<PackageReference Include="EventStoreCore.Sqlite" Version="1.0.2-beta.2" />
<PackageVersion Include="EventStoreCore.Sqlite" Version="1.0.2-beta.2" />
<PackageReference Include="EventStoreCore.Sqlite" />
paket add EventStoreCore.Sqlite --version 1.0.2-beta.2
#r "nuget: EventStoreCore.Sqlite, 1.0.2-beta.2"
#:package EventStoreCore.Sqlite@1.0.2-beta.2
#addin nuget:?package=EventStoreCore.Sqlite&version=1.0.2-beta.2&prerelease
#tool nuget:?package=EventStoreCore.Sqlite&version=1.0.2-beta.2&prerelease
EventStoreCore.Sqlite
SQLite persistence configuration for EventStoreCore using EF Core.
Setup
Register your application DbContext, configure the EventStore model in
OnModelCreating, and tell EventStoreCore to reuse that context:
using EventStoreCore;
using EventStoreCore.Sqlite;
using Microsoft.EntityFrameworkCore;
public sealed class AppDbContext(DbContextOptions<AppDbContext> options)
: DbContext(options)
{
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.UseEventStore();
}
}
services.AddDbContext<AppDbContext>(
options => options.UseSqlite(connectionString));
services.AddEventStore(builder =>
{
builder.ExistingDbContext<AppDbContext>();
});
ExistingDbContext<TDbContext>() does not create or migrate a separate
database. EventStoreCore uses the application-owned context, connection,
transaction, and migrations. Add migrations from the application project after
calling UseEventStore().
Applications using the standalone entity outbox should also call
modelBuilder.UseEntityOutbox() on the context that owns its tables.
SQLite in-memory databases exist only while their connection remains open. Keep
the connection alive for the full test or application scope when using
Data Source=:memory:.
Provider behavior
- Event payloads, headers, snapshots, and entity-outbox JSON use
TEXTcolumns. DateTimeOffsetvalues are normalized to UTC and stored as integer ticks so timestamp replay filters and ordering translate in SQLite.- Stream identity is
(Id, StreamType, TenantId). - Event ordering within a stream is protected by a unique
(StreamId, StreamType, TenantId, Version)index. - The integer
Events.Sequenceprimary key provides the generated global event position required by SQLite. - SQLite permits only one database writer at a time, so generated sequences
cannot commit out of allocation order and no additional application lock is
installed. A competing writer can receive
SQLITE_BUSYafter the configured busy timeout; applications should retry that transaction. EventIdis a generated or caller-supplied GUID with a global uniqueness constraint; consumers must not rely on GUID ordering.- Inline projections share the append transaction. Subscription and eventual projection delivery is at-least-once.
- Daemons require an application-provided
IDistributedLockProvider. Select an implementation appropriate for every process that shares the database.
Provider-specific database migrations remain application owned. SQLite has
limited ALTER TABLE support, so review generated table-rebuild migrations
when upgrading EventStoreCore.
| 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
- EventStoreCore (>= 1.0.2-beta.2)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.1)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 2.1.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2-beta.2 | 62 | 7/28/2026 |