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 0.9.0.14
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider" Version="0.9.0.14" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider --version 0.9.0.14
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider -Version 0.9.0.14

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.DataProvider

Overview

This package delivers the Entity Framework Core contexts and base classes used across Eltheon hosts. It standardizes the authentication/authorization schema (AuthDbContext), the CMS domain context (DatabaseContext) and wires them to the configuration and globals infrastructure so templates can plug in provider-specific migrations.

Components

  • Contexts/AuthDbContext hosts ASP.NET Core Identity tables along with Eltheon-specific role/permission entities.
  • Contexts/DatabaseContext represents the CMS/domain data and is designed to be extended by feature-specific DbContexts or migrations.
  • References Redeon.SuperSiteEngineCore.Database for shared EF abstractions and Core.Features.Identity for user models.

Usage

services.AddDbContext<AuthDbContext>(options =>
    options.UseSqlServer(configuration.GetConnectionString("Default")));

services.AddDbContext<DatabaseContext>(options =>
    options.UseSqlServer(configuration.GetConnectionString("Default")));

Providers (SQL Server, MySQL, SQLite) supply their own migrations in separate packages; this project contains only the core model definitions so migrations remain provider-specific.

Notes

  • Depends on GlobalConfig for connection string defaults when running migrations or installers.
  • When extending the context, ensure new entities live in a provider-specific project so database diffs stay isolated.

Metrics

When Features.Metrik is registered in the host, both contexts emit counters/histograms on every SaveChanges/SaveChangesAsync:

  • eltheon_db_query_duration_seconds{db_type,operation} – histogram of save durations.
  • eltheon_db_query_total{db_type,operation,success} – counter of save invocations and outcomes.

db_type follows the configured provider (MsSQL/MySQL/SQLite), operation is SaveChanges or SaveChangesAsync, and success is true/false.