Franz.Common.Http.EntityFramework
1.2.62
See the version list below for details.
dotnet add package Franz.Common.Http.EntityFramework --version 1.2.62
NuGet\Install-Package Franz.Common.Http.EntityFramework -Version 1.2.62
<PackageReference Include="Franz.Common.Http.EntityFramework" Version="1.2.62" />
paket add Franz.Common.Http.EntityFramework --version 1.2.62
#r "nuget: Franz.Common.Http.EntityFramework, 1.2.62"
// Install Franz.Common.Http.EntityFramework as a Cake Addin #addin nuget:?package=Franz.Common.Http.EntityFramework&version=1.2.62 // Install Franz.Common.Http.EntityFramework as a Cake Tool #tool nuget:?package=Franz.Common.Http.EntityFramework&version=1.2.62
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:
TransactionFilter
for managing database transactions seamlessly in API requests.
- Service Registration:
ServiceCollectionExtensions
for registering database contexts and transactional filters.
- Entity Framework Core Integration:
- Built-in support for relational database operations.
- Modular Design:
- Compatible with other Franz Framework Entity Framework components, such as
Franz.Common.EntityFramework.MariaDB
.
- Compatible with other Franz Framework Entity Framework components, such as
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): For relational database support.
- Microsoft.AspNetCore.Mvc (2.2.0): For integrating EF with ASP.NET Core MVC applications.
- Franz.Common.DependencyInjection: Simplifies dependency injection.
- Franz.Common.EntityFramework.MariaDB: Extends MariaDB-specific configurations and utilities.
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.Http.EntityFramework --version 1.2.62
Usage
1. Register Database Contexts
Use ServiceCollectionExtensions
to register EF Core database contexts:
using Franz.Common.Http.EntityFramework.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddDatabaseContext<MyDbContext>(options =>
options.UseSqlServer("YourConnectionString"));
}
}
2. Enable Transaction Filters
Apply the TransactionFilter
to ensure transactional consistency:
using Franz.Common.Http.EntityFramework.Transactions;
services.AddControllers(options =>
{
options.Filters.Add<TransactionFilter>();
});
3. Middleware Configuration
Integrate EF Core into the middleware pipeline:
using Franz.Common.Http.EntityFramework.Extensions;
app.UseEntityFrameworkMiddleware();
Integration with Franz Framework
The Franz.Common.Http.EntityFramework package integrates seamlessly with:
- Franz.Common.EntityFramework: Provides shared EF utilities and repository patterns.
- Franz.Common.EntityFramework.MariaDB: Offers MariaDB-specific configurations.
- Franz.Common.DependencyInjection: Simplifies service registration and dependency management.
Ensure these dependencies are installed to leverage the full capabilities of the library.
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 database transactional consistency. - Introduced
ServiceCollectionExtensions
for EF Core context registration. - Full compatibility with Franz.Common.EntityFramework and Franz.Common.EntityFramework.MariaDB.
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.DependencyInjection (>= 1.2.62)
- Franz.Common.EntityFramework.MariaDB (>= 1.2.62)
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
- 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.