IronAlpine.Data.EFCore.Modeling
2.1.2
dotnet add package IronAlpine.Data.EFCore.Modeling --version 2.1.2
NuGet\Install-Package IronAlpine.Data.EFCore.Modeling -Version 2.1.2
<PackageReference Include="IronAlpine.Data.EFCore.Modeling" Version="2.1.2" />
<PackageVersion Include="IronAlpine.Data.EFCore.Modeling" Version="2.1.2" />
<PackageReference Include="IronAlpine.Data.EFCore.Modeling" />
paket add IronAlpine.Data.EFCore.Modeling --version 2.1.2
#r "nuget: IronAlpine.Data.EFCore.Modeling, 2.1.2"
#:package IronAlpine.Data.EFCore.Modeling@2.1.2
#addin nuget:?package=IronAlpine.Data.EFCore.Modeling&version=2.1.2
#tool nuget:?package=IronAlpine.Data.EFCore.Modeling&version=2.1.2
IronAlpine.Data.EFCore.Modeling
Why
This package is the EF Core schema contribution runtime used by multiple IronAlpine packages. It removes hidden coupling by hosting model contributor contracts and execution in a small foundation package.
What It Provides
IModelContributorcontract for modular schema extensions.IronAlpineModelCustomizerthat executes all registered contributors.AddIronAlpineDataEfCoreModeling()registration extension.- Startup validation marker used by higher-level packages.
Installation
dotnet add package IronAlpine.Data.EFCore.Modeling
Program.cs
builder.Services.AddIronAlpineDataEfCoreModeling();
Extension API
AddIronAlpineDataEfCoreModeling(IServiceCollection services): Registers the EF model customizer and validation marker.
Contributor Pattern
public sealed class MyProjectionContributor : IModelContributor
{
public void Contribute(ModelBuilder modelBuilder)
{
modelBuilder.Entity<MyProjection>(entity =>
{
entity.ToTable("MyProjections");
entity.HasKey(x => x.Id);
});
}
}
builder.Services.AddSingleton<IModelContributor, MyProjectionContributor>();
Combinations
- With
IronAlpine.Data.EFCore: repository/UoW + contributor runtime. - With
IronAlpine.Messaging.InboxOutbox.EFCore: inbox/outbox/deadletter tables. - With
IronAlpine.Security.Authorization.EFCore: permission projection table. - With
IronAlpine.Caching.Redis: cache settings table contribution.
Troubleshooting
- Symptom: contributor table not created.
: Ensure
AddIronAlpineDataEfCoreModeling()is called in the container used by your DbContext. - Symptom: startup validation error from messaging/security/caching EF package. : Add this package and ensure your EF DbContext registration uses the same service provider.
Notes
This package only provides schema composition runtime. It does not provide repositories, transactions, or unit of work.
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
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on IronAlpine.Data.EFCore.Modeling:
| Package | Downloads |
|---|---|
|
IronAlpine.Data.EFCore
Entity Framework Core implementation for IronAlpine data abstractions with repositories, interceptors, enumeration mapping, and resilience integration. |
|
|
IronAlpine.Caching.Redis
Redis implementation for IronAlpine.Caching with EF Core-backed cache settings, pub/sub invalidation for multi-pod deployments, and table contributor support. |
|
|
IronAlpine.EventBus.Kafka
Deterministic single-package Kafka event bus with inbox-first persistence and replay support. |
|
|
IronAlpine.Security
Unified IronAlpine security package with abstractions, JWT/ASP.NET Core authorization integration, and EF Core permission projection store. |
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.