Anarchy.Toolkit.Core.Persistence.Abstractions
2.0.1
dotnet add package Anarchy.Toolkit.Core.Persistence.Abstractions --version 2.0.1
NuGet\Install-Package Anarchy.Toolkit.Core.Persistence.Abstractions -Version 2.0.1
<PackageReference Include="Anarchy.Toolkit.Core.Persistence.Abstractions" Version="2.0.1" />
<PackageVersion Include="Anarchy.Toolkit.Core.Persistence.Abstractions" Version="2.0.1" />
<PackageReference Include="Anarchy.Toolkit.Core.Persistence.Abstractions" />
paket add Anarchy.Toolkit.Core.Persistence.Abstractions --version 2.0.1
#r "nuget: Anarchy.Toolkit.Core.Persistence.Abstractions, 2.0.1"
#:package Anarchy.Toolkit.Core.Persistence.Abstractions@2.0.1
#addin nuget:?package=Anarchy.Toolkit.Core.Persistence.Abstractions&version=2.0.1
#tool nuget:?package=Anarchy.Toolkit.Core.Persistence.Abstractions&version=2.0.1
Anarchy.Toolkit.Core.Persistence.Abstractions
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Core · Package catalog
Persistence contracts for applications that should not depend on a particular database provider.
dotnet add package Anarchy.Toolkit.Core.Persistence.Abstractions
- Use the unit-of-work and async-local flow-context contracts to coordinate persistence operations.
- Define repositories against the supplied repository and storage-policy abstractions and exceptions.
- Choose a concrete provider from the toolkit's relational adapters or implement your own.
When to use it
Reference this package from application and domain-facing code that needs repository or transaction contracts but should not depend on a database driver. It defines boundaries, not a connection pool, SQL implementation or database schema.
How to use it
- Define application-specific repository interfaces and expose only the operations your use cases need. Implement them in an infrastructure project using the supplied reader, writer or batch contracts where appropriate.
- Let a UseCase own a managed session with
RunInManagedSessionAsync. An Aggregate that must also work alone can useRunInJoinedOrManagedSessionAsync; an Aggregate that only participates usesRunInJoinedSessionAsyncand cannot commit or roll back the caller's transaction. - Use the storage-policy and flow-context contracts when implementing a provider adapter. Pass cancellation tokens through the operation so database work and rollback cleanup follow the unit-of-work contract.
- In the host, register a concrete provider such as
Infrastructure.Persistence.Db.Postgres,Infrastructure.Persistence.Db.OracleorInfrastructure.Persistence.Db.Mysql. Supply connection and resilience options there, not in application code.
Select transaction boundaries deliberately: the abstractions do not provision databases, retry entire business operations or make external side effects transactional.
See the package catalog and database provider guide.
Releases
See the release notes for the complete release history.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anarchy.Toolkit.Core (>= 2.0.1)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.15)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Anarchy.Toolkit.Core.Persistence.Abstractions:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Infrastructure.Persistence.Db
Provider-agnostic relational database implementation of the persistence abstraction: connection pool, Unit of Work, resilience policy, dialect contract, repository bases, service health reports, and the transactional outbox / event store (repository contracts, records, type-id cache, and repository bases; providers supply the dialect and the embedded SQL). |
|
|
Anarchy.Toolkit.Web
Shared REST API pipeline: startup bases, entry points, middleware, auth, swagger, and presentation helpers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
## Releases
### 2.0.1
- chore(build): Format package release notes property
### 2.0.0
- feat(automation): establish onboarding and layering conventions
- feat(telemetry)!: introduce provider-neutral application telemetry
- refactor(packages)!: restructure persistence and automation packages
- refactor(core)!: reshape telemetry, event and health contracts
- fix(persistence)!: preserve unit-of-work transaction ownership
- refactor(telemetry)!: remove legacy APIs and simplify namespaces
### 1.1.1
- docs(packages): identify each package's pillar and layer
- build(packages): attribute the copyright to Leandro Melão Medeiros
- build: relicense under Apache-2.0 and update the package metadata
### 1.1.0
- build(deps): upgrade Swashbuckle.AspNetCore to 11.0.1 and Microsoft.OpenApi to 3.11.1
### 1.0.6
- docs: expand XML docblocks across all projects for the DocFX API reference
### 1.0.5
- refactor(src): clean up code style across library packages
### 1.0.3
- build: migrate local automation to build tooling
### 1.0.2
- docs: expand package guides and release histories
### 1.0.1
- Added a package-specific NuGet README.
### 1.0.0
- Introduced repository and unit-of-work contracts, storage policies, flow context and persistence exceptions.