EF.Toolkit.Audit.Sqlite
10.0.0-alpha.7
dotnet add package EF.Toolkit.Audit.Sqlite --version 10.0.0-alpha.7
NuGet\Install-Package EF.Toolkit.Audit.Sqlite -Version 10.0.0-alpha.7
<PackageReference Include="EF.Toolkit.Audit.Sqlite" Version="10.0.0-alpha.7" />
<PackageVersion Include="EF.Toolkit.Audit.Sqlite" Version="10.0.0-alpha.7" />
<PackageReference Include="EF.Toolkit.Audit.Sqlite" />
paket add EF.Toolkit.Audit.Sqlite --version 10.0.0-alpha.7
#r "nuget: EF.Toolkit.Audit.Sqlite, 10.0.0-alpha.7"
#:package EF.Toolkit.Audit.Sqlite@10.0.0-alpha.7
#addin nuget:?package=EF.Toolkit.Audit.Sqlite&version=10.0.0-alpha.7&prerelease
#tool nuget:?package=EF.Toolkit.Audit.Sqlite&version=10.0.0-alpha.7&prerelease
EF.Toolkit.Audit.Sqlite
The SQLite provider for EF.Toolkit.Audit. Install this package rather than the core one: it brings the core with it and maps the audit table onto SQLite.
Install
dotnet add package EF.Toolkit.Audit.Sqlite
Setup
One call, after the provider:
services.AddDbContext<AppDb>(o => o
.UseSqlite(connectionString)
.UseAuditing());
If you reference more than one provider package, use UseSqliteAuditing().
What this package provides
| Column | Type |
|---|---|
EntityType, EntityKey, ActorId, ActorName, ActorType, TenantId, Source |
TEXT |
OccurredAt |
TEXT, EF Core's own DateTimeOffset format |
Changes |
TEXT with CHECK (json_valid(…)) |
SQLite stores JSON as text and does not validate it, so the check earns its keep: a payload that is
not JSON would be unreadable by every json_extract anyone later writes against it.
SQLite has no schemas — EF Core ignores one, with a warning — so the audit schema the other engines
default to is dropped here.
Indexing the payload
.UseSqliteAuditing(a => a.IndexJsonPath("$.new.Status"))
adds a stored generated column over json_extract("Changes", '$.new.Status'), with an index on it.
SQLite cannot add a stored generated column to an existing table, so a path added later needs the
table rebuilt — which EF Core's SQLite migrations do for you.
Limits that come from SQLite
- EF Core cannot
ORDER BYaDateTimeOffseton SQLite, so a query ordering entries byOccurredAthas to order on the client. The index over it still serves filters. - EF Core's SQLite provider does not take part in
System.Transactionsscopes, so audit entries cannot either.
Supported versions
SQLite 3.35 and later, through Microsoft.Data.Sqlite, covered by the differential harness on
every commit.
Full documentation
Everything else — registering entity types and properties, actors, ambient scopes, multi-tenancy, the payload format, options, diagnostics and limitations — is in the EF.Toolkit.Audit documentation.
License
MIT
| 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
- EF.Toolkit.Audit (>= 10.0.0-alpha.7)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0 && < 11.0.0)
- Microsoft.EntityFrameworkCore.Sqlite.Core (>= 10.0.0 && < 11.0.0)
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 |
|---|---|---|
| 10.0.0-alpha.7 | 71 | 10/18/2026 |