IronAlpine.Data.Abstractions
3.0.0
dotnet add package IronAlpine.Data.Abstractions --version 3.0.0
NuGet\Install-Package IronAlpine.Data.Abstractions -Version 3.0.0
<PackageReference Include="IronAlpine.Data.Abstractions" Version="3.0.0" />
<PackageVersion Include="IronAlpine.Data.Abstractions" Version="3.0.0" />
<PackageReference Include="IronAlpine.Data.Abstractions" />
paket add IronAlpine.Data.Abstractions --version 3.0.0
#r "nuget: IronAlpine.Data.Abstractions, 3.0.0"
#:package IronAlpine.Data.Abstractions@3.0.0
#addin nuget:?package=IronAlpine.Data.Abstractions&version=3.0.0
#tool nuget:?package=IronAlpine.Data.Abstractions&version=3.0.0
IronAlpine.Data.Abstractions
Why
Defines storage-agnostic contracts for repositories, unit of work, audit context, and query abstractions. This package is the stable API boundary used by handlers and application services.
Key Contracts
IUnitOfWorkIReadRepository<TEntity>IRepository<TEntity>IAggregateRepository<TAggregate>IProjectionReadRepository<TProjection>IProjectionRepository<TProjection>IAuditableCommand
Installation
dotnet add package IronAlpine.Data.Abstractions
Usage
public sealed class GetUsersQueryHandler : IQueryHandler<GetUsersQuery, PagedResult<UserDto>>
{
private readonly IProjectionReadRepository<UserProjection> _read;
public GetUsersQueryHandler(IProjectionReadRepository<UserProjection> read)
{
_read = read;
}
}
Repository Selection Rules
- Aggregate writes:
IAggregateRepository<TAggregate>. - Projection reads:
IProjectionReadRepository<TProjection>. - Projection update operations:
IProjectionRepository<TProjection>. - Keep
IQueryableinside handlers/services, never leak to controllers.
Unit of Work
IUnitOfWork remains handler-controlled. Save boundary is explicit in handler logic.
Paging
Use package-level paging contracts from IronAlpine.Kernel with repository overloads that accept paged request objects where supported by concrete provider packages.
Combinations
- With
IronAlpine.Data.EFCore: EF implementations for repositories/UoW. - With
IronAlpine.Data.Dapper: Dapper path for read-heavy workloads. - With
IronAlpine.Data.EFCore.Mediator: transaction and auditing behaviors.
Troubleshooting
- Injecting
IRepository<TProjection>for read-only flow is an architecture smell. - Using
IAggregateRepositoryfor projection updates should fail by design.
Migration Note
Prefer replacing legacy common persistence interfaces with these abstractions first, then switch provider package registrations.
Configuration Deep Dive
When a package exposes options classes, use builder.Configuration binding and keep values explicit per environment.
Common guidance:
- Prefer explicit values in production.
- Keep retries/timeouts conservative; tune with telemetry.
- Enable startup validation in non-development environments.
- Fail fast when required dependencies are missing.
Integration Patterns
Pattern A: API service with EF + Messaging
- Register EF provider package.
- Register messaging inbox/outbox package.
- Register mediator and behavior order.
- Enable health readiness checks for DB and broker.
Pattern B: Read-heavy service with Dapper + Messaging
- Register Dapper data package.
- Register messaging package with consumer enabled.
- Add observability and structured logging.
Pattern C: Security-focused service
- Register security ASP.NET package.
- Add policy catalog or resolver.
- Register authorization EFCore projection package only where needed.
Options Checklist
Use this checklist when configuring any IronAlpine package:
- Required connection strings present.
- Feature flags intentional (
Enable*values reviewed). - Retry and timeout values match SLO expectations.
- Startup validation behavior understood.
- Environment-specific defaults are overridden in production.
Troubleshooting Matrix
- Startup failure with validation error : A required dependency package or config value is missing. Check package registrations and bound options sections.
- Background workers not starting
: Verify execution mode,
Enable*flags, and hosted services registration. - Policy/authorization mismatch : Check claim types, policy naming strategy, and catalog entries.
- Cache stale or no-hit behavior : Validate key generation, invalidation path, and distributed lock configuration.
- Messaging duplicate handling issues
: Verify
event-idpropagation and idempotency key construction.
Best-Practice Notes
- Keep handler logic deterministic and side-effect boundaries explicit.
- Keep
IQueryableusage inside application handlers/services. - Keep transaction save boundaries in handlers where business intent is clear.
- Prefer explicit topic policy metadata for critical events.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. 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
- IronAlpine.Kernel (>= 3.0.0)
-
net9.0
- IronAlpine.Kernel (>= 3.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on IronAlpine.Data.Abstractions:
| Package | Downloads |
|---|---|
|
IronAlpine.Data.EFCore
Entity Framework Core implementation for IronAlpine data abstractions with repositories, interceptors, enumeration mapping, and resilience integration. |
|
|
IronAlpine.Data.EFCore.Mediator
Mediator pipeline behaviors that bridge IronAlpine.Mediator and IronAlpine.Data.EFCore. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Stable mediator release with request/response, notification publish strategies, streaming, and dependency injection integration.