DbSignal.SqlServer
1.0.2
dotnet add package DbSignal.SqlServer --version 1.0.2
NuGet\Install-Package DbSignal.SqlServer -Version 1.0.2
<PackageReference Include="DbSignal.SqlServer" Version="1.0.2" />
<PackageVersion Include="DbSignal.SqlServer" Version="1.0.2" />
<PackageReference Include="DbSignal.SqlServer" />
paket add DbSignal.SqlServer --version 1.0.2
#r "nuget: DbSignal.SqlServer, 1.0.2"
#:package DbSignal.SqlServer@1.0.2
#addin nuget:?package=DbSignal.SqlServer&version=1.0.2
#tool nuget:?package=DbSignal.SqlServer&version=1.0.2
DbSignal.SqlServer
Know which rows someone else changed — whichever application wrote them.
await using var feed = SqlServerFeed.For(connectionString)
.Watch("dbo.Products")
.Build();
await foreach (var batch in feed.ReadAsync(Checkpoint.Now, ct))
foreach (var table in batch.Tables)
foreach (var key in table.Keys)
Console.WriteLine($"{key.Kind} row {key.Values[0]} in {table.QualifiedName}");
+ Insert Id=1
~ Update Id=1
- Delete Id=1
Built on Change Tracking — not CDC, not Service Broker, not triggers.
What it gives you
| Detail | KeysChanged — the primary keys that changed, and insert/update/delete |
| Survives app restart | Yes, via checkpoint |
| Survives downtime | Yes, within the retention window |
| Setup required | ALTER DATABASE … SET CHANGE_TRACKING = ON, plus per table |
| Privileges | ALTER to provision; SELECT + VIEW CHANGE TRACKING to read |
Works on every edition, including Express and LocalDB. Change Tracking is not the Enterprise-tier feature — that is CDC, which this package deliberately does not use.
Why not SqlDependency / SqlTableDependency
SqlDependency is documented by Microsoft as "not designed for use in client
applications" and does not support SQL Server Express. SqlTableDependency builds Service
Broker infrastructure it must then tear down, and its queries must not contain JOINs.
This package queries CHANGETABLE(CHANGES …) and leaves no infrastructure behind beyond
the Change Tracking flag you turned on.
Retention expiry is loud, and that matters
If your checkpoint falls outside the retention window, the gap is genuinely unreadable.
This package throws ResyncRequiredException so you can reload from source.
A hand-rolled poller typically finds no rows in that situation and reports "nothing changed" — silent data loss. This is the single biggest correctness advantage over rolling your own.
Targets net8.0. MIT licensed.
Source and full documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- DbSignal.Abstractions (>= 1.0.2)
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- Microsoft.Data.SqlClient (>= 5.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.