Franz.Common.Http.EntityFramework 1.2.63

There is a newer version of this package available.
See the version list below for details.
dotnet add package Franz.Common.Http.EntityFramework --version 1.2.63                
NuGet\Install-Package Franz.Common.Http.EntityFramework -Version 1.2.63                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Franz.Common.Http.EntityFramework" Version="1.2.63" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Franz.Common.Http.EntityFramework --version 1.2.63                
#r "nuget: Franz.Common.Http.EntityFramework, 1.2.63"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Franz.Common.Http.EntityFramework as a Cake Addin
#addin nuget:?package=Franz.Common.Http.EntityFramework&version=1.2.63

// Install Franz.Common.Http.EntityFramework as a Cake Tool
#tool nuget:?package=Franz.Common.Http.EntityFramework&version=1.2.63                

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.

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.63

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:

  1. Clone the repository.
  2. Create a feature branch.
  3. 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.63

  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.64 3 1/29/2025
1.2.63 48 1/27/2025
1.2.62 40 1/8/2025