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
With Features.Metrik registered, both contexts emit:
- Saves:
eltheon_db_save_duration_seconds{db_type,operation}andeltheon_db_save_total{db_type,operation,success}forSaveChanges/SaveChangesAsync. - Commands (reads + writes):
eltheon_db_command_duration_seconds{db_type,execute_method,command_type}andeltheon_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.