Franz.Common.Http.EntityFramework
                               
                            
                                1.6.19
                            
                        
                    dotnet add package Franz.Common.Http.EntityFramework --version 1.6.19
NuGet\Install-Package Franz.Common.Http.EntityFramework -Version 1.6.19
<PackageReference Include="Franz.Common.Http.EntityFramework" Version="1.6.19" />
<PackageVersion Include="Franz.Common.Http.EntityFramework" Version="1.6.19" />
<PackageReference Include="Franz.Common.Http.EntityFramework" />
paket add Franz.Common.Http.EntityFramework --version 1.6.19
#r "nuget: Franz.Common.Http.EntityFramework, 1.6.19"
#:package Franz.Common.Http.EntityFramework@1.6.19
#addin nuget:?package=Franz.Common.Http.EntityFramework&version=1.6.19
#tool nuget:?package=Franz.Common.Http.EntityFramework&version=1.6.19
Franz.Common.Http.EntityFramework
A specialized library within the Franz Framework that integrates Entity Framework Core with ASP.NET Core applications. This package simplifies transactional handling, dependency injection, and middleware configurations, enhancing database operations in HTTP-based services.
Features
- Transactional Filters: - TransactionFilterfor managing database transactions seamlessly in API requests.
 
- Service Registration: - ServiceCollectionExtensionsfor registering database contexts and transactional filters.
 
- Entity Framework Core Integration: - Built-in support for relational database operations.
 
- Multi-Database Provider Support (since 1.3.4, extended in 1.6.2 & 1.6.3): - Configure MariaDB, Postgres, Oracle, or SQL Server via appsettings.json.
- Since 1.6.2 → Polyglot persistence: support for MongoDB and Azure Cosmos DB as first-class NoSQL providers.
- New in 1.6.3 → Environment-aware multi-database registration with provider validation, preventing silent misconfigurations.
 
- Configure MariaDB, Postgres, Oracle, or SQL Server via 
- Modular Design: - Compatible with other Franz Framework persistence components, such as: - Franz.Common.EntityFramework.MariaDB
- Franz.Common.EntityFramework.Postgres
- Franz.Common.EntityFramework.Oracle
- Franz.Common.EntityFramework.SQLServer
- Franz.Common.MongoDB
- Franz.Common.AzureCosmosDB
 
 
Version Information
- Current Version: 1.6.19 → Adds environment-aware validation, stronger governance for multi-database setups, and provider-context alignment.
- Part of the private Franz Framework ecosystem.
Dependencies
This package relies on:
- Microsoft.EntityFrameworkCore (8.0.0)
- Microsoft.EntityFrameworkCore.Relational (8.0.0)
- Microsoft.AspNetCore.Mvc (2.2.0)
- Franz.Common.DependencyInjection
- Franz.Common.EntityFramework.MariaDB
- Franz.Common.EntityFramework.Postgres
- Franz.Common.EntityFramework.Oracle
- Franz.Common.EntityFramework.SQLServer
- Franz.Common.MongoDB (since 1.6.2)
- Franz.Common.AzureCosmosDB (since 1.6.2)
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.Http.EntityFramework
Usage
1. Configure Provider in appsettings.json
{
  "Database": {
    "Provider": "Postgres",
    "ConnectionString": "Host=localhost;Database=mydb;Username=myuser;Password=mypass"
  },
  "MongoDb": {
    "Provider": "Mongo",
    "ConnectionString": "mongodb://localhost:27017",
    "DatabaseName": "FranzMongoDb"
  },
  "CosmosDb": {
    "Provider": "Cosmos",
    "ConnectionString": "AccountEndpoint=https://your-account.documents.azure.com:443/;AccountKey=your-key;",
    "DatabaseName": "FranzCosmosDb"
  }
}
Supported providers: MariaDb, Postgres, Oracle, SqlServer, Mongo, Cosmos.
2. Register Database Context
builder.Services.AddDatabase<MyDbContext>(builder.Environment, builder.Configuration);
For multiple contexts (polyglot persistence):
builder.Services.RegisterDatabaseForContext<MyRelationalDbContext>(builder.Configuration.GetSection("Database"));
builder.Services.RegisterDatabaseForContext<MyMongoDbContext>(builder.Configuration.GetSection("MongoDb"));
builder.Services.RegisterDatabaseForContext<MyCosmosStore>(builder.Configuration.GetSection("CosmosDb"));
3. Enable Transaction Filters
Automatically applied by default, but can be explicitly added:
using Franz.Common.Http.EntityFramework.Transactions;
services.AddControllers(options =>
{
    options.Filters.Add<TransactionFilter>();
});
Integration with Franz Framework
The Franz.Common.Http.EntityFramework package integrates seamlessly with:
- Franz.Common.EntityFramework
- Franz.Common.EntityFramework.MariaDB
- Franz.Common.EntityFramework.Postgres
- Franz.Common.EntityFramework.Oracle
- Franz.Common.EntityFramework.SQLServer
- Franz.Common.MongoDB
- Franz.Common.AzureCosmosDB
- Franz.Common.DependencyInjection
Changelog
Version 1.6.3
- Environment-aware validation added to - AddDatabase<TDbContext>and- RegisterDatabaseForContext<TContext>:- Enforces correct provider/context alignment for relational (EF), MongoDB, and CosmosDB contexts.
- Prevents silent misconfigurations (wrong provider/context combinations now throw explicit exceptions).
- Guards against hardcoded connection strings — all values must come from appsettings.{Environment}.json.
 
- Governance baked in for relational DBs: - Automatic registration of transactions per HTTP call, generic repositories, and behaviors.
 
- Extended multi-database orchestration: - Support for mixing multiple contexts (MariaDB,Postgres,Oracle,SQLServer,MongoDB,CosmosDB) within the same app.
- Polyglot persistence scenarios are now governed by clear, opinionated rules.
 
- Support for mixing multiple contexts (
Version 1.6.2
- Extended multi-database provider support to include NoSQL providers: - Added MongoDB support via Franz.Common.MongoDB.
- Added Azure Cosmos DB support via Franz.Common.AzureCosmosDB.
 
- Added MongoDB support via 
- AddDatabase<TDbContext>now supports both relational and document database providers via config.
- Introduced - CosmosDBMessageStoreand- MongoMessageStoreto unify outbox & dead-letter messaging in NoSQL providers.
- Full alignment with Franz polyglot persistence philosophy. 
Version 1.3.4
- Added multi-database provider support (MariaDB, Postgres, Oracle, SQL Server).
- Provider selection now handled via appsettings.json(Database:Provider).
- Simplified registration: AddDatabase<TDbContext>(env, config).
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.19)
- Franz.Common.DependencyInjection (>= 1.6.19)
- Franz.Common.EntityFramework.MariaDB (>= 1.6.19)
- Franz.Common.EntityFramework.Oracle (>= 1.6.19)
- Franz.Common.EntityFramework.PostGres (>= 1.6.19)
- Franz.Common.EntityFramework.SQLServer (>= 1.6.19)
- Franz.Common.MongoDB (>= 1.6.19)
- Microsoft.AspNetCore.Mvc (>= 2.3.0)
- 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.19 | 84 | 10/25/2025 | 
| 1.6.15 | 170 | 10/20/2025 | 
| 1.6.14 | 165 | 10/15/2025 | 
| 1.6.3 | 162 | 10/9/2025 | 
| 1.6.2 | 161 | 10/7/2025 | 
| 1.5.9 | 167 | 9/24/2025 | 
| 1.5.4 | 166 | 9/23/2025 | 
| 1.5.3 | 212 | 9/21/2025 | 
| 1.5.2 | 213 | 9/21/2025 | 
| 1.5.0 | 210 | 9/21/2025 | 
| 1.4.4 | 184 | 9/20/2025 | 
| 1.3.14 | 294 | 9/18/2025 | 
| 1.3.13 | 289 | 9/18/2025 | 
| 1.3.5 | 288 | 9/17/2025 | 
| 1.3.4 | 299 | 9/16/2025 | 
| 1.3.3 | 290 | 9/16/2025 | 
| 1.3.2 | 289 | 9/15/2025 | 
| 1.3.1 | 88 | 9/12/2025 | 
| 1.3.0 | 312 | 8/25/2025 | 
| 1.2.65 | 178 | 3/3/2025 | 
| 1.2.64 | 140 | 1/29/2025 | 
| 1.2.63 | 132 | 1/27/2025 | 
| 1.2.62 | 123 | 1/8/2025 |