DKNet.EfCore.Events 13.3.1

dotnet add package DKNet.EfCore.Events --version 13.3.1
                    
NuGet\Install-Package DKNet.EfCore.Events -Version 13.3.1
                    
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="DKNet.EfCore.Events" Version="13.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.EfCore.Events" Version="13.3.1" />
                    
Directory.Packages.props
<PackageReference Include="DKNet.EfCore.Events" />
                    
Project file
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 DKNet.EfCore.Events --version 13.3.1
                    
#r "nuget: DKNet.EfCore.Events, 13.3.1"
                    
#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 DKNet.EfCore.Events@13.3.1
                    
#: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=DKNet.EfCore.Events&version=13.3.1
                    
Install as a Cake Addin
#tool nuget:?package=DKNet.EfCore.Events&version=13.3.1
                    
Install as a Cake Tool

DKNet.EfCore.Events

Domain-event collection and publishing during successful async saves for .NET developers using entity event queues or RaisesEvent declarations.

✨ Why use it?

  • Keep transport calls out of domain methods by collecting queued event objects on save.
  • Capture declared create/update/delete rules before save and map their payloads afterward.
  • Fan the combined batch out to host-supplied publisher implementations.

🚀 Quick Start

Use a .NET 10 console project. Install the package, then replace Program.cs with the example.

dotnet new console -f net10.0 -n EfCoreDemo
cd EfCoreDemo
dotnet add package DKNet.EfCore.Events
dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 10.0.12
using Microsoft.EntityFrameworkCore;
using DKNet.EfCore.Hooks;
using Microsoft.Extensions.DependencyInjection;

using var connection = new Microsoft.Data.Sqlite.SqliteConnection("Data Source=:memory:");
connection.Open();
var services = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
services.AddLogging();
services.AddDbContextWithHook<DemoDb>(o => o.UseSqlite(connection));
services.AddEventPublisher<DemoDb, ConsolePublisher>();
using var provider = services.BuildServiceProvider();
using var scope = provider.CreateScope();
await using var db = scope.ServiceProvider.GetRequiredService<DemoDb>();
await db.Database.EnsureCreatedAsync();
var item = new Item();
item.Announce();
db.Add(item);
await db.SaveChangesAsync();

public sealed class DemoDb(DbContextOptions<DemoDb> options) : DbContext(options)
{
    public DbSet<Item> Items => Set<Item>();
}
public sealed class Item : DKNet.EfCore.Abstractions.Entities.Entity<int>
{
    public string Name { get; set; } = "Coffee";
    public void Announce() => AddEvent(new ItemCreated(Name));
}
public sealed record ItemCreated(string Name);
public sealed class ConsolePublisher : DKNet.EfCore.Abstractions.Events.DefaultEventPublisher
{
    public override Task PublishAsync(object value, CancellationToken cancellationToken = default)
    {
        Console.WriteLine(value); // ItemCreated { Name = Coffee }
        return Task.CompletedTask;
    }
}

Run with dotnet run.

Documentation

Guide Read when
Package overview Start with architecture and the end-to-end flow.
Publish queued events after a successful save Connect entity event queues to one or more IEventPublisher implementations through the save hook.
Publish payloads declared on entity operations Evaluate [RaisesEvent] rules before the write, then map qualifying payloads from the entity after a successful save.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DKNet.EfCore.Events:

Package Downloads
DKNet.SlimBus.Extensions

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.3.1 44 10/26/2026
13.3.0 100 10/22/2026
13.2.8 64 10/22/2026
13.2.7 167 10/11/2026
13.2.6 108 10/10/2026
13.2.5 362 10/2/2026
13.2.4 114 10/1/2026
13.2.3 111 10/1/2026
13.2.2 109 10/1/2026
13.2.1 111 10/1/2026
13.2.0 108 10/1/2026
13.1.3 187 9/21/2026
13.1.2 376 9/18/2026
13.1.1 122 9/18/2026
13.1.0 114 9/18/2026
13.0.2 115 9/18/2026
13.0.1 119 9/18/2026
13.0.0 137 9/18/2026
12.0.0 137 9/17/2026
11.0.0 196 9/17/2026
Loading failed