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/AuthDbContexthosts ASP.NET Core Identity tables along with Eltheon-specific role/permission entities.Contexts/DatabaseContextrepresents the CMS/domain data and is designed to be extended by feature-specific DbContexts or migrations.- References
Redeon.SuperSiteEngineCore.Databasefor shared EF abstractions andCore.Features.Identityfor 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
GlobalConfigfor 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.