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

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

With Features.Metrik registered, both contexts emit:

  • Saves: eltheon_db_save_duration_seconds{db_type,operation} and eltheon_db_save_total{db_type,operation,success} for SaveChanges/SaveChangesAsync.
  • Commands (reads + writes): eltheon_db_command_duration_seconds{db_type,execute_method,command_type} and eltheon_db_command_total{db_type,execute_method,command_type,success} via DbCommandInterceptor.

db_type follows the configured provider (MsSQL/MySQL/SQLite). execute_method is the EF command method (e.g., ExecuteReader/ExecuteNonQuery), command_type is the ADO.NET CommandType (Text/StoredProcedure), and success is true/false.