Energy Insight Hub
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
EnergyInsightHub.Data.EnergyHubContext Class Reference

Represents the database context for the EnergyInsightHub application. More...

Inheritance diagram for EnergyInsightHub.Data.EnergyHubContext:

Public Member Functions

 EnergyHubContext (IConfiguration configuration)
 Initializes a new instance of the EnergyHubContext class with the specified configuration.
 
void ResetDB ()
 Resets the database by removing existing readings and adding test readings from a CSV file.
 

Protected Member Functions

override void OnConfiguring (DbContextOptionsBuilder optionsBuilder)
 Configures the database connection using the provided options.
 
override void OnModelCreating (ModelBuilder modelBuilder)
 Configures the entity models and relationships for the database.
 

Protected Attributes

readonly IConfiguration Configuration
 The configuration instance used for database connection settings.
 

Properties

DbSet< ReadingReadings [get, set]
 Represents a database table for storing readings.
 

Detailed Description

Represents the database context for the EnergyInsightHub application.

Constructor & Destructor Documentation

◆ EnergyHubContext()

EnergyInsightHub.Data.EnergyHubContext.EnergyHubContext ( IConfiguration configuration)

Initializes a new instance of the EnergyHubContext class with the specified configuration.

Parameters
configurationThe configuration instance.

The documentation for this class was generated from the following file: