Endatix.Framework
0.7.0
dotnet add package Endatix.Framework --version 0.7.0
NuGet\Install-Package Endatix.Framework -Version 0.7.0
<PackageReference Include="Endatix.Framework" Version="0.7.0" />
<PackageVersion Include="Endatix.Framework" Version="0.7.0" />
<PackageReference Include="Endatix.Framework" />
paket add Endatix.Framework --version 0.7.0
#r "nuget: Endatix.Framework, 0.7.0"
#:package Endatix.Framework@0.7.0
#addin nuget:?package=Endatix.Framework&version=0.7.0
#tool nuget:?package=Endatix.Framework&version=0.7.0
Endatix.Framework
This package provides common plugin and extensibility points used to extend or customize the Endatix Platform. It allows developers to build and integrate custom functionality within the platform.
Endatix Platform is an open-source data collection and management library for .NET. It is designed for building secure, scalable, and integrated form-centric applications that work with SurveyJS. Endatix empowers business users with advanced workflows, automation, and meaningful insights.
Installation:
dotnet add package Endatix.Framework
Recommended Usage:
For running and hosting the Endatix Platform, Endatix.Api.Host is the recommended main package as it simplifies the installation and setup process.
dotnet add package Endatix.Api.Host
Module kernel
Optional platform modules implement IEndatixModule. The host registers them via EndatixBuilder.UseModule({Name}Module.Instance), which scans the module assembly for MediatR handlers and FastEndpoints and calls ConfigureServices at finalization.
| Contract | Purpose |
|---|---|
IEndatixModule |
Required entry point — Assembly + ConfigureServices |
IHasFeatureFlag |
Optional — module skipped when flag is disabled in Endatix:FeatureFlags |
IHasDbMigrations |
Optional marker — module ships EF migrations; host warns if no contributor was registered |
IDbContextMigrationContributor |
Opt-in startup migration contract for module/custom DbContexts |
Startup migrations (two phases)
When Endatix:Data:EnableAutoMigrations is true, DatabaseMigrationService runs:
- Core (always) —
AppDbContextandAppIdentityDbContextare migrated automatically; no contributor registration required. - Modules (opt-in) — each module with its own DbContext calls
AddDbContextWithMigrations<TContext>inConfigureServices(registers DbContext + migration contributor).
Module persistence checklist
- Create
{Name}Module : IEndatixModule, IHasDbMigrations(+IHasFeatureFlagwhen optional). - In
ConfigureServices, callbuilder.AddDbContextWithMigrations<TContext>(...)fromEndatix.Infrastructure.Data(registers DbContext + migration contributor). - Use a dedicated schema and module-owned
Persistence/folder for entities, configs, and migrations. - Prefer provider-split DbContext types (one snapshot per provider) over namespace-filtered single contexts when supporting PostgreSQL and SQL Server.
- Do not add
Setup.cs— all DI belongs on the module class.
Observability (startup)
Startup logging uses Microsoft.Extensions.Logging source generation — not Serilog APIs — so hosts can switch to OpenTelemetry without changing call sites.
Layer responsibilities
| Layer | Responsibility |
|---|---|
| Framework | EndatixEventIds (global registry), EndatixLoggerExtensions (generic operation lifecycle only) |
| Infrastructure / Hosting | Domain-specific *LoggerExtensions collocated with the feature (e.g. MigrationLoggerExtensions, EndatixBuilderLoggerExtensions) |
Framework exposes only generic primitives:
EndatixEventIds— platform-wide stable EventId registry (claim a range before adding domain extensions)EndatixLoggerExtensions—LogOperationStarted,LogOperationCompleted,LogOperationSkipped,LogOperationFailed
Domain-specific messages (migrations, seeding, host builders) belong in collocated *LoggerExtensions types in Infrastructure or Hosting — not in Framework.
Event ID registry
EndatixEventIds follows the same grouping pattern as Actions — nested static classes per area, plus utility collections:
EndatixEventIds.Lifecycle.OperationStarted // Framework
EndatixEventIds.Migrations.DbContextMigrated // Infrastructure
EndatixEventIds.Seeding.SampleDataSeeded // Infrastructure
EndatixEventIds.IdentitySeed.UserCreated // Infrastructure
EndatixEventIds.Hosting.ModuleRegistered // Hosting
EndatixEventIds.Ranges.MigrationsStart // claim before adding IDs
EndatixEventIds.Migrations.All // all IDs in a group
EndatixEventIds.IsMigration(eventId) // range helpers
| Nested class | Range | Owner |
|---|---|---|
Lifecycle |
1000–1003 | Framework |
Migrations |
1004–1099 | Infrastructure |
Seeding / IdentitySeed |
1100–1199 | Infrastructure |
Hosting |
1200–1299 | Hosting |
Ranges.* |
2000+ | Reserved (Auth, Forms, Webhooks) |
Claim a block in EndatixEventIds.Ranges before adding domain extensions.
Usage
Always pass the caller's typed ILogger (e.g. ILogger<DatabaseMigrationService>) so logger category is preserved for tracing.
Use Framework primitives for lifecycle; domain wrappers for specialized messages:
// Framework — generic lifecycle
_logger.LogOperationStarted(MigrationOperations.ApplyDbMigrations);
// Infrastructure — domain-specific (collocated)
_logger.LogDbContextMigrated(nameof(AppDbContext), durationMs);
Existing domain wrappers:
| Package | Location |
|---|---|
| Infrastructure | Data/Logging/MigrationLoggerExtensions.cs, Data/Logging/DataSeedingLoggerExtensions.cs |
| Infrastructure | Identity/Seed/IdentitySeedLoggerExtensions.cs |
| Hosting | Builders/Logging/EndatixBuilderLoggerExtensions.cs |
OTEL attribute mapping
MEL placeholder → future log attribute:
| Placeholder | OTEL alignment |
|---|---|
Operation |
operation.name / custom dimension |
DbContext |
Application-specific; pairs with future db.operation.name spans |
DurationMs |
Duration in milliseconds |
DbSystem |
db.system (e.g. SqlServer, PostgreSql) |
Reason |
Skip/disable reason |
EventId |
Stable correlation via EndatixEventIds |
More Information:
For detailed installation instructions, please visit Endatix Installation Guide.
| 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
- Ardalis.GuardClauses (>= 5.0.0)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Microsoft.FeatureManagement.AspNetCore (>= 4.4.0)
- Serilog.AspNetCore (>= 10.0.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Endatix.Framework:
| Package | Downloads |
|---|---|
|
Endatix.Infrastructure
This package provides implementations of the application's dependencies and external resources. It includes infrastructure-level services like database access, messaging, and other integrations. Endatix Platform is an open-source data collection and management library for .NET. |
|
|
Endatix.Api
This package contains the key presentation layer of the Endatix Platform, including both Public and Management APIs. Endatix Platform is an open-source data collection and management library for .NET. |
|
|
Endatix.Persistence.SqlServer
This package provides implementations of the application's dependencies and external resources. It includes infrastructure-level services like database access, messaging, and other integrations. Endatix Platform is an open-source data collection and management library for .NET. |
|
|
Endatix.Persistence.PostgreSql
This package provides implementations of the application's dependencies and external resources. It includes infrastructure-level services like database access, messaging, and other integrations. Endatix Platform is an open-source data collection and management library for .NET. |
|
|
Endatix.Hosting
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.