Franz.Common.Messaging.EntityFramework
2.3.1
dotnet add package Franz.Common.Messaging.EntityFramework --version 2.3.1
NuGet\Install-Package Franz.Common.Messaging.EntityFramework -Version 2.3.1
<PackageReference Include="Franz.Common.Messaging.EntityFramework" Version="2.3.1" />
<PackageVersion Include="Franz.Common.Messaging.EntityFramework" Version="2.3.1" />
<PackageReference Include="Franz.Common.Messaging.EntityFramework" />
paket add Franz.Common.Messaging.EntityFramework --version 2.3.1
#r "nuget: Franz.Common.Messaging.EntityFramework, 2.3.1"
#:package Franz.Common.Messaging.EntityFramework@2.3.1
#addin nuget:?package=Franz.Common.Messaging.EntityFramework&version=2.3.1
#tool nuget:?package=Franz.Common.Messaging.EntityFramework&version=2.3.1
Franz.Common.Messaging.EntityFramework
Messaging and distributed integration for the Franz.Common framework on .NET 10.
Overview
The Franz.Common.Messaging.EntityFramework package provides messaging and distributed integration within Franz.Common. It is designed to compose with the rest of the framework rather than imposing unrelated infrastructure choices on every application.
Installation
dotnet add package Franz.Common.Messaging.EntityFramework
Design principles
- Explicit composition: register only the capabilities the application needs.
- Clear boundaries: keep domain and application contracts independent from provider-specific infrastructure where the package's role permits it.
- Predictable behavior: make configuration, failure modes, and lifecycle ownership visible rather than relying on hidden conventions.
- Operational readiness: validate security, resilience, diagnostics, and compatibility for the actual deployment environment.
Usage and configuration
Follow the package-specific setup, configuration, and code examples below. Only configure external services when this package requires them, and keep secrets outside source control.
Package-specific guide
A specialized library within the Franz Framework designed to integrate Entity Framework Core with messaging workflows. This package ensures transactional consistency for outbox patterns in relational databases, while also supporting polyglot persistence by delegating messaging storage to MongoDB or Azure Cosmos DB when configured.
Features
Transactional Filters
TransactionFilterto manage database transactions in messaging contexts, ensuring consistency and rollback.
Service Registration
ServiceCollectionExtensionsto simplify the integration of messaging and persistence services.
Entity Framework Core Messaging
- Native support for relational outbox patterns when using EF Core (MariaDB, Postgres, Oracle, SQL Server).
Polyglot Messaging Support (new in 1.6.2)
- Messaging outbox/dead-letter can also be stored in MongoDB or Azure Cosmos DB via unified configuration.
- Clean abstraction with
IMessageStore, so your messaging workflow does not change regardless of provider.
Version Information
- Current Version: v2.3.0
- Part of the private Franz Framework ecosystem.
Dependencies
This package relies on:
- Microsoft.EntityFrameworkCore (8.0.0) – Core EF functionality for database access
- Microsoft.EntityFrameworkCore.Relational (8.0.0) – Relational database support
- Franz.Common.EntityFramework.MariaDB – MariaDB provider bootstrap
- Franz.Common.Messaging.Hosting – Hosting + transaction coordination
- Franz.Common.MongoDB (new in 1.6.2) – MongoDB messaging provider
- Franz.Common.AzureCosmosDB (new in 1.6.2) – Cosmos DB messaging provider
Installation
From Private Azure Feed
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Messaging.EntityFramework
Usage
1. Configure Messaging Provider
{
"Messaging": {
"Provider": "Postgres" // Options: MariaDb, Postgres, Oracle, SqlServer, Mongo, Cosmos
},
"Database": {
"ConnectionString": "Host=localhost;Database=franz;Username=sa;Password=pass"
},
"MongoDb": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "FranzOutbox"
},
"CosmosDb": {
"ConnectionString": "AccountEndpoint=https://your-account.documents.azure.com:443/;AccountKey=your-key;",
"DatabaseName": "FranzCosmosOutbox"
}
}
2. Register Messaging Outbox
using Franz.Common.Messaging.EntityFramework.Extensions;
builder.Services.AddMessageStore<MyDbContext>(builder.Configuration);
- If
ProviderisPostgres,MariaDb,Oracle, orSqlServer→ EF-based outbox viaDbContext. - If
ProviderisMongo→ outbox/dead-letter stored in Mongo collections. - If
ProviderisCosmos→ outbox/dead-letter stored in Cosmos containers.
3. Transaction Filters (Relational Only)
When using relational databases, ensure transaction consistency with filters:
using Franz.Common.Messaging.EntityFramework.Transactions;
services.AddControllers(options =>
{
options.Filters.Add<TransactionFilter>();
});
4. Messaging Service Example
public class MessagingService
{
private readonly IMessageStore _messageStore;
public MessagingService(IMessageStore messageStore)
{
_messageStore = messageStore;
}
public async Task PublishAsync(Message message)
{
await _messageStore.SaveAsync(message);
}
}
The code above works the same whether your provider is EF, Mongo, or Cosmos.
Integration with Franz Framework
The Franz.Common.Messaging.EntityFramework package integrates seamlessly with:
- Franz.Common.EntityFramework (base EF abstractions)
- Franz.Common.EntityFramework.MariaDB
- Franz.Common.EntityFramework.Postgres
- Franz.Common.EntityFramework.Oracle
- Franz.Common.EntityFramework.SQLServer
- Franz.Common.MongoDB (NoSQL messaging)
- Franz.Common.AzureCosmosDB (NoSQL messaging)
- Franz.Common.DependencyInjection
Changelog
Version 1.6.2
- Extended messaging persistence beyond EF: added support for MongoDB and Azure Cosmos DB.
- Unified config-driven provider selection for messaging outbox/dead-letter (
Messaging:Provider). - EF relational providers still supported via
DbContextBase+StoredMessageentity. - Mongo & Cosmos backed by dedicated
IMessageStoreimplementations. - All providers expose the same abstraction for transparent messaging workflows.
Version 1.3
- Upgraded to .NET 9.0.8
- Added new features and improvements
- Separated business concepts from mediator concepts
- Now compatible with both the in-house mediator and MediatR
Version 1.2.65
Upgraded version to .NET 9
Version 1.6.20
- Updated to .NET 10.0
- Removal and Deprecation of oracle support due to Oracle's shift away from EF Core.
v2.0.1 – Internal Modernization
- Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
- All APIs remain fully backward compatible.
- Tests, listeners, and pipeline components modernized.
Dependency maintenance — October 2026
This project's dependency references were reviewed and updated as part of the repository-wide .NET 10 maintenance pass. The intended target framework and public API remain unchanged. Verify the resolved direct and transitive dependency graph through the repository's dependency validation workflow before publishing. See the central dependency upgrade record.
| Product | Versions 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. |
-
net10.0
- Franz.Common.AzureCosmosDB (>= 2.3.1)
- Franz.Common.EntityFramework.MariaDB (>= 2.3.1)
- Franz.Common.EntityFramework.PostGres (>= 2.3.1)
- Franz.Common.EntityFramework.SQLServer (>= 2.3.1)
- Franz.Common.Messaging.Hosting (>= 2.3.1)
- Franz.Common.MongoDB (>= 2.3.1)
- Microsoft.EntityFrameworkCore (>= 10.0.14)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.14)
- SharpCompress (>= 0.50.7)
- Snappier (>= 1.3.1)
- System.Security.Cryptography.Pkcs (>= 10.0.13)
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 |
|---|---|---|
| 2.3.1 | 0 | 10/26/2026 |
| 2.3.0 | 151 | 7/21/2026 |
| 2.2.19 | 123 | 7/19/2026 |
| 2.2.18 | 122 | 7/19/2026 |
| 2.2.17 | 123 | 7/12/2026 |
| 2.2.16 | 127 | 7/2/2026 |
| 2.2.15 | 127 | 6/29/2026 |
| 2.2.14 | 125 | 6/29/2026 |
| 2.2.13 | 131 | 6/29/2026 |
| 2.2.12 | 120 | 6/28/2026 |
| 2.2.11 | 122 | 6/28/2026 |
| 2.2.10 | 132 | 6/28/2026 |
| 2.2.9 | 126 | 6/28/2026 |
| 2.2.8 | 123 | 6/28/2026 |
| 2.2.7 | 130 | 6/7/2026 |
| 2.2.6 | 132 | 6/6/2026 |
| 2.2.5 | 138 | 6/4/2026 |
| 2.2.4 | 129 | 6/3/2026 |
| 2.2.3 | 129 | 6/2/2026 |
| 2.2.2 | 129 | 6/2/2026 |