Architect.EntityFramework.DbContextManagement 2.0.0

dotnet add package Architect.EntityFramework.DbContextManagement --version 2.0.0                
NuGet\Install-Package Architect.EntityFramework.DbContextManagement -Version 2.0.0                
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="Architect.EntityFramework.DbContextManagement" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Architect.EntityFramework.DbContextManagement --version 2.0.0                
#r "nuget: Architect.EntityFramework.DbContextManagement, 2.0.0"                
#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 Architect.EntityFramework.DbContextManagement as a Cake Addin
#addin nuget:?package=Architect.EntityFramework.DbContextManagement&version=2.0.0

// Install Architect.EntityFramework.DbContextManagement as a Cake Tool
#tool nuget:?package=Architect.EntityFramework.DbContextManagement&version=2.0.0                

Manage your DbContexts the right way.

The persistence or infrastructure layer uses the DbContext (e.g. from a repository). Controlling its scope and transaction lifetime, however, is ideally the reponsibility of the orchestrating layer (e.g. from an application service). This package adds that ability to Entity Framework Core 5.0.0 and up.

https://github.com/TheArchitectDev/Architect.EntityFramework.DbContextManagement

Release notes:

2.0.0:
- BREAKING: Now using AmbientContexts 2.0.0.
- Semi-breaking: Failure on commit (extremely rare) now throws IOException instead of Exception.
- Added static DbContextScope<TDbContext>.HasDbContext, to match the feature set of IDbContextAccessor.
- Retries now ensure that the connection is closed before retrying, to avoid the risk of leaking session state. (As with EF's DbContext disposal in general, this relies on the database provider's connection reset.)
- Scoped execution now protects against dangerous "failure on commit" retries even on manual commits (rather than just on IExecutionScope's implicit commit).
- Worked around an EF bug where the DbContext would obscure the exception caused by a broken model behind an ObjectDisposedException, even though DbContext._disposed=false.
- Scoped execution: Fixed a bug where the exception caused by a broken model would be obscured behind a wrongful IncompatibleVersionException.
- MockDbContextProvider: Fixed a bug where nested scopes would not work as expected.
- MockDbContextProvider: Fixed a bug where soft attempts to roll back a transaction when there was none could cause an unintended TransactionAbortedException.

1.0.1:
- Now using AmbientContexts 1.1.1, which fixes extremely rare bugs and improves performance.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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
2.0.0 6,891 3/23/2023
1.0.1 1,623 1/1/2022
1.0.0 1,420 12/18/2020