Franz.Common.Messaging.EntityFramework
1.6.2
See the version list below for details.
dotnet add package Franz.Common.Messaging.EntityFramework --version 1.6.2
NuGet\Install-Package Franz.Common.Messaging.EntityFramework -Version 1.6.2
<PackageReference Include="Franz.Common.Messaging.EntityFramework" Version="1.6.2" />
<PackageVersion Include="Franz.Common.Messaging.EntityFramework" Version="1.6.2" />
<PackageReference Include="Franz.Common.Messaging.EntityFramework" />
paket add Franz.Common.Messaging.EntityFramework --version 1.6.2
#r "nuget: Franz.Common.Messaging.EntityFramework, 1.6.2"
#:package Franz.Common.Messaging.EntityFramework@1.6.2
#addin nuget:?package=Franz.Common.Messaging.EntityFramework&version=1.6.2
#tool nuget:?package=Franz.Common.Messaging.EntityFramework&version=1.6.2
Franz.Common.Messaging.EntityFramework
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
TransactionFilter
to manage database transactions in messaging contexts, ensuring consistency and rollback.
Service Registration
ServiceCollectionExtensions
to 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: 1.6.2
- 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
Provider
isPostgres
,MariaDb
,Oracle
, orSqlServer
→ EF-based outbox viaDbContext
. - If
Provider
isMongo
→ outbox/dead-letter stored in Mongo collections. - If
Provider
isCosmos
→ 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
+StoredMessage
entity. - Mongo & Cosmos backed by dedicated
IMessageStore
implementations. - 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
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. |
-
net9.0
- Franz.Common.AzureCosmosDB (>= 1.6.2)
- Franz.Common.EntityFramework.MariaDB (>= 1.6.2)
- Franz.Common.EntityFramework.Oracle (>= 1.6.2)
- Franz.Common.EntityFramework.PostGres (>= 1.6.2)
- Franz.Common.EntityFramework.SQLServer (>= 1.6.2)
- Franz.Common.Messaging.Hosting (>= 1.6.2)
- Franz.Common.MongoDB (>= 1.6.2)
- Microsoft.EntityFrameworkCore (>= 9.0.8)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.8)
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.6.3 | 5 | 10/9/2025 | |
1.6.2 | 64 | 10/7/2025 | |
1.5.9 | 150 | 9/24/2025 | |
1.5.4 | 157 | 9/23/2025 | |
1.5.3 | 203 | 9/21/2025 | |
1.5.2 | 208 | 9/21/2025 | |
1.5.0 | 188 | 9/21/2025 | |
1.4.4 | 165 | 9/20/2025 | |
1.3.14 | 292 | 9/18/2025 | |
1.3.13 | 287 | 9/18/2025 | |
1.3.5 | 503 | 9/17/2025 | |
1.3.4 | 301 | 9/16/2025 | |
1.3.3 | 299 | 9/16/2025 | |
1.3.2 | 279 | 9/15/2025 | |
1.3.1 | 103 | 9/12/2025 | |
1.3.0 | 302 | 8/25/2025 | |
1.2.65 | 187 | 3/3/2025 | |
1.2.64 | 143 | 1/29/2025 | |
1.2.63 | 126 | 1/27/2025 | |
1.2.62 | 118 | 1/8/2025 |