Found 7 packages
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.1: - Enhancement: Upgraded package versions. 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.
Now access entity framework dbContext as Ambient property. No more hassles of passing dbContext across layers.
A library for managing the lifetime of Entity Framework Core DbContext instances. This package is based on the original DbContextScope repository by Mehdi El Gueddari, updated for .NET 6+ and EF Core, with a number of additional improvements and bug fixes.
A library for managing the lifetime of Entity Framework Core DbContext instances. This package is based on the original DbContextScope repository by Mehdi El Gueddari, updated for .NET 6+ and EF Core, with a number of additional improvements and bug fixes.
Main DataOnion implementation, including AmbientDbContext, UnitOfWork, Repositories, DataInitialisers etc.
Set of classes that implement ambient db context for EF and db context lifecycle management. To contribute or for more information visit https://github.com/SSWConsulting/SSW.DataOnion2
Entity Framework extensions for the Architect.Identities package. https://github.com/TheArchitectDev/Architect.Identities Release notes: 2.1.1: - Enhancement: Upgraded package versions. 2.1.0: - The ConfigureDecimalIdTypes() extension method now truncates needless trailing zeros received from the database provider (`123.0` => `123`), as is the case with SQLite. 2.0.0: - BREAKING: Now targeting .NET 6+, to support new EF Core APIs. - BREAKING: Now using EF Core 7.0.0. - BREAKING: No longer referencing the Identities package. (The current package is still considered an addition to it, but the hard link is gone.) - BREAKING: Removed ApplicationInstanceIds. (See Identities 2.0.0.) - BREAKING: Decimal IDs in SQLite may get reconstituted with a one (inadvertent) decimal place, e.g. "1234567890123456789012345678" => "1234567890123456789012345678.0". Detecting and fixing for SQLite is a hassle. - BREAKING: DecimalIdMappingExtensions's methods have been replaced by modelConfigurationBuilder.ConfigureDecimalIdTypes(). This should be called from DbContext.ConfigureConventions(). - The new extension method handles decimal-convertible types (i.e. value objects) in addition to plain decimals. - The new extension method also sets DefaultTypeMapping, to achieve appropriate behavior when EF writes things like CAST(). Property mappings alone do not cover such scenarios. 1.0.2: - Fixed an incompatibility with EF Core 6.0.0+ (caused by a breaking change in EF itself). - Now using AmbientContexts 1.1.1, which fixes extremely rare bugs and improves performance. 1.0.1: - Now using AmbientContexts 1.1.0, for a performance improvement.