DomainRelay.EFCore 3.1.3

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

DomainRelay.EFCore

EF Core integration for DomainRelay:

  • Transaction pipeline behavior (single or multi-DbContext resolver)
  • Premium Outbox (SaveChanges interceptor + background dispatcher + admin operations)

Install

  • DomainRelay.EFCore

Transactions

Single DbContext

using DomainRelay.EFCore;

services.AddDomainRelayEfCoreTransactionResolver<MyDbContext>();

Multi DbContext

using DomainRelay.EFCore;

services.AddDbContext<AuthDbContext>(/* ... */);
services.AddDbContext<AppDbContext>(/* ... */);

services.AddDomainRelayEfCoreTransactionResolver(resolver =>
{
    resolver
        .Map<AuthDbContext>(t => t.FullName!.Contains(".Auth."))
        .Map<AppDbContext>(t => t.FullName!.Contains(".Application."));
});

1) Add Outbox mapping

using DomainRelay.EFCore.Outbox;

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    base.OnModelCreating(modelBuilder);
    modelBuilder.AddDomainRelayOutbox(tableName: "outbox_messages", schema: "ops");
}

2) Register Outbox + Dispatcher

using DomainRelay.EFCore;
using DomainRelay.EFCore.Outbox;
using DomainRelay.EFCore.Outbox.Abstractions;

services.AddSingleton<IOutboxPublisher, MyBusPublisher>();

services.AddDomainRelayEfCoreOutbox<MyDbContext>(b =>
{
    b.WithDbContextOptions((sp, o) =>
    {
        o.UseNpgsql(builder.Configuration.GetConnectionString("db"));
    });

    b.WithOutboxOptions(o =>
    {
        o.Schema = "ops";
        o.TableName = "outbox_messages";
        o.BatchSize = 200;
        o.PollingInterval = TimeSpan.FromSeconds(1);
        o.LeaseDuration = TimeSpan.FromSeconds(30);
        o.MaxAttempts = 12;
        o.ProcessedRetention = TimeSpan.FromDays(14);
    });

    // Allowlist registry (required): register all event types explicitly
    b.WithTypeRegistry(reg =>
    {
        reg.Register<UserCreated>("iam.user.created.v1");
    });
});

3) Operate (stats, dead-letter, requeue)

DomainRelay.EFCore registers IOutboxAdmin for operator actions:

  • Stats/health: GetStatsAsync()
  • Inspect dead-letters: GetDeadLettersAsync(...)
  • Requeue: RequeueAsync(...)
  • Purge processed: PurgeProcessedOlderThanAsync(...)
Product 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 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DomainRelay.EFCore:

Package Downloads
DomainRelay.Transport.RabbitMQ

RabbitMQ transport publisher for DomainRelay EF Core Outbox.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.3 97 5/25/2026
3.1.2 104 5/24/2026
3.1.1 126 4/26/2026
3.1.0 119 4/25/2026
3.0.1 116 4/24/2026
3.0.0 114 4/24/2026
2.0.1 118 3/6/2026
2.0.0 120 3/5/2026
1.0.2-alpha.4 58 3/5/2026
1.0.1-alpha.4 56 3/5/2026
1.0.0 114 3/5/2026