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" />
<PackageReference Include="DomainRelay.EFCore" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=DomainRelay.EFCore&version=3.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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."));
});
Outbox (recommended for production)
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 | 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 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.
-
net8.0
- DomainRelay.Abstractions (>= 3.1.3)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
-
net9.0
- DomainRelay.Abstractions (>= 3.1.3)
- Microsoft.EntityFrameworkCore (>= 9.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
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.