Franz.Common.Messaging.EntityFramework
1.2.62
dotnet add package Franz.Common.Messaging.EntityFramework --version 1.2.62
NuGet\Install-Package Franz.Common.Messaging.EntityFramework -Version 1.2.62
<PackageReference Include="Franz.Common.Messaging.EntityFramework" Version="1.2.62" />
paket add Franz.Common.Messaging.EntityFramework --version 1.2.62
#r "nuget: Franz.Common.Messaging.EntityFramework, 1.2.62"
// Install Franz.Common.Messaging.EntityFramework as a Cake Addin #addin nuget:?package=Franz.Common.Messaging.EntityFramework&version=1.2.62 // Install Franz.Common.Messaging.EntityFramework as a Cake Tool #tool nuget:?package=Franz.Common.Messaging.EntityFramework&version=1.2.62
Franz.Common.Messaging.EntityFramework
A specialized library within the Franz Framework designed to integrate Entity Framework Core with messaging workflows. This package provides tools for managing database transactions seamlessly in messaging scenarios, ensuring consistency across distributed systems.
Features
- Transactional Filters:
TransactionFilter
to manage database transactions in messaging contexts, ensuring consistency and rollback capabilities.
- Service Registration:
ServiceCollectionExtensions
to simplify the integration of messaging and Entity Framework Core services.
- Entity Framework Core Integration:
- Built-in support for relational databases through Entity Framework Core.
Version Information
- Current Version: 1.2.62
- 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): Provides relational database support.
- Franz.Common.EntityFramework.MariaDB: Extends MariaDB-specific configurations.
- Franz.Common.Messaging.Hosting: Enables hosting configurations for messaging.
Installation
From Private Azure Feed
Since this package is hosted privately, configure your NuGet client:
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 --version 1.2.62
Usage
1. Register Database Contexts
Use ServiceCollectionExtensions
to register EF Core database contexts and messaging services:
using Franz.Common.Messaging.EntityFramework.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMessagingWithEntityFramework<MyDbContext>(options =>
options.UseSqlServer("YourConnectionString"));
}
}
2. Enable Transaction Filters
Apply the TransactionFilter
to ensure transactional consistency in messaging workflows:
using Franz.Common.Messaging.EntityFramework.Transactions;
services.AddControllers(options =>
{
options.Filters.Add<TransactionFilter>();
});
3. Integrate Messaging with Transactions
Ensure that all messaging operations are wrapped within a transaction, providing consistency across distributed systems:
using Franz.Common.Messaging.EntityFramework.Transactions;
public class MessagingService
{
private readonly TransactionFilter _transactionFilter;
public MessagingService(TransactionFilter transactionFilter)
{
_transactionFilter = transactionFilter;
}
public async Task ProcessMessageAsync()
{
await _transactionFilter.BeginTransactionAsync();
// Perform messaging operations
await _transactionFilter.CommitTransactionAsync();
}
}
Integration with Franz Framework
The Franz.Common.Messaging.EntityFramework package integrates seamlessly with:
- Franz.Common.EntityFramework: Core utilities for EF Core integration.
- Franz.Common.EntityFramework.MariaDB: Provides additional configurations for MariaDB.
- Franz.Common.Messaging.Hosting: Enables hosting and transaction management for messaging workflows.
Contributing
This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:
- Clone the repository.
- Create a feature branch.
- Submit a pull request for review.
License
This library is licensed under the MIT License. See the LICENSE
file for more details.
Changelog
Version 1.2.62
- Added
TransactionFilter
for transactional consistency in messaging workflows. - Integrated
ServiceCollectionExtensions
for EF Core and messaging services registration. - Full compatibility with Franz.Common.EntityFramework and Franz.Common.Messaging.Hosting.
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 was computed. 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. |
-
net8.0
- Franz.Common.EntityFramework.MariaDB (>= 1.2.62)
- Franz.Common.Messaging.Hosting (>= 1.2.62)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.0)
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.2.62 | 46 | 1/8/2025 |