NuGet ยท nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider

Core database context classes for Eltheon Framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider --version 2.9.11.6
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider" Version="2.9.11.6" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider --version 2.9.11.6
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider -Version 2.9.11.6

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider

Overview

This package provides the canonical Eltheon DataProvider v3 foundation. It contains the shared EF Core base contexts, provider/profile registries, migration-status contracts, DataProviderAdmin adapters, and EF activity diagnostics used by template hosts and feature packages.

Template hosts own the concrete runtime DbContexts, connection topology, and provider-specific migration assemblies. Feature packages consume the v3 contracts instead of reading legacy GlobalConfig state directly.

DataProvider v3 Model

  • Hosts register runtime DbContext descriptors through DataProviderAdminDbContextDescriptor so DataProviderAdmin can inspect only approved contexts.
  • Hosts expose migration status through IDataProviderAdminMigrationStatusProvider, usually by adapting the template migration operations service.
  • Provider-specific migrations stay in provider-specific assemblies. This package provides status and resolution infrastructure, not template migration files.
  • Legacy GlobalConfig access remains compatibility plumbing for existing bootstrap and design-time paths, but new runtime code should use the v3 connection, binding, and migration contracts.

Admin Diagnostics

DataProviderAdmin uses this package to show:

  • configured runtime connections with sensitive values redacted,
  • registered DbContext bindings and health status,
  • v3 migration status per provider/context pair,
  • safe read-only data browser metadata and rows for whitelisted contexts,
  • EF command, save, and connection activity snapshots.

The admin feature owns the API and UI surface; this package owns the neutral DataProvider contracts and metrics infrastructure.

Metrics And EF Activity

With an IMetrics implementation registered, DataProvider contexts emit low-cardinality metrics through the neutral Core.Abstractions metrics facade:

  • Saves: eltheon_db_save_duration_seconds, eltheon_db_save_total, eltheon_db_context_save_duration_seconds, eltheon_db_context_save_total.
  • Commands: eltheon_db_command_duration_seconds, eltheon_db_command_total, eltheon_db_context_command_duration_seconds, eltheon_db_context_command_total.
  • Failures and slow commands: eltheon_db_command_failures_total, eltheon_db_command_timeouts_total, eltheon_db_slow_query_total.
  • Connections: eltheon_db_connection_open_duration_seconds, eltheon_db_connection_open_total, eltheon_db_connection_failures_total, eltheon_db_connection_active_estimate.

Labels are limited to low-cardinality provider/context/operation/outcome values such as db_type, context, operation, outcome, execute_method, and command_type.

IDataProviderEfActivityDiagnostics stores recent sanitized EF command, save, and connection samples in memory. MetricsDbCommandInterceptor, MetricsDbConnectionInterceptor, and the base context SaveChanges overrides feed this diagnostics store so admin dashboards can show real activity windows without coupling to a concrete metrics exporter.

Usage

Register the v3 infrastructure from the host composition layer:

services.AddEltheonDataProviderV3(options =>
{
    // Host-owned provider, connection, binding, and migration options.
});

services.AddEltheonDataProviderMetrics();

Register host-owned DbContext descriptors and migration adapters from the template or application package, not from feature packages.