DbContextSCope package for EF6 and EFCore. Forked from https://github.com/mehdime/DbContextScope. Compatible with .net 4.0+ (EF6) and .net Standard 1.3+ (EFCore). Credit also to https://github.com/ninety7 for code regarding refreshing parent entities.
A library for managing the lifetime of Entity Framework Core 6 DbContext instances. This package is based on the original DbContextScope repository by Mehdi El Gueddari, updated for .NET 6 and EF Core 6, with a number of additional improvements and bug fixes.
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...