SqlTableDependencyCore 1.0.0
dotnet add package SqlTableDependencyCore --version 1.0.0
NuGet\Install-Package SqlTableDependencyCore -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SqlTableDependencyCore" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SqlTableDependencyCore" Version="1.0.0" />
<PackageReference Include="SqlTableDependencyCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SqlTableDependencyCore --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SqlTableDependencyCore, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SqlTableDependencyCore@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SqlTableDependencyCore&version=1.0.0
#tool nuget:?package=SqlTableDependencyCore&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SqlTableDependencyCore
SqlTableDependencyCore is a lightweight .NET library that enables real-time notifications when records in a SQL Server table are inserted, updated, or deleted. It hides the complexity of SQL Server Service Broker, allowing you to easily track table changes without writing additional queries.
Features
- Listens to INSERT, UPDATE, and DELETE operations
- No manual setup for SQL Server Service Broker
- Automatically creates and manages queues and services
- Supports .NET Core, .NET 5+
- Simple and developer-friendly API
Installation
Install via NuGet:
dotnet add package SqlTableDependencyCore
Or with the NuGet Package Manager:
Install-Package SqlTableDependencyCore
Example Usage
using SqlTableDependencyCore;
using TableDependencyCore.SqlClient.Base.Enums;
using TableDependencyCore.SqlClient.Base.EventArgs;
var connectionString = "yourConnectionString";
var dependency = new SqlTableDependencyCore<TransactionCustomerPoint>(
connectionString,
tableName: nameof(TransactionCustomerPoint),
schemaName: "dbo",
notifyOn: DmlTriggerType.All
);
dependency.OnChanged += Dependency_OnChanged;
void Dependency_OnChanged(object sender, RecordChangedEventArgs<TransactionCustomerPoint> e)
{
var changedData = e.Entity;
var changeType = e.ChangeType;
// Handle the change (Insert, Update, Delete)
Console.WriteLine($"Change Type: {changeType}, Data: {changedData}");
}
dependency.Start();
Console.WriteLine("Listening for table changes...");
Console.ReadKey();
Requirements
- SQL Server 2008 or later
- Service Broker enabled on the database
Author
Zanyar Jalal
© 2025 Zanyar Jalal. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Microsoft.Data.SqlClient (>= 6.0.1)
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.0 | 984 | 4/8/2025 |