Represents the database context for the EnergyInsightHub application.
More...
|
| 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.
|
|
|
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.
|
|
|
readonly IConfiguration | Configuration |
| The configuration instance used for database connection settings.
|
|
|
DbSet< Reading > | Readings [get, set] |
| Represents a database table for storing readings.
|
|
Represents the database context for the EnergyInsightHub application.
◆ EnergyHubContext()
EnergyInsightHub.Data.EnergyHubContext.EnergyHubContext |
( |
IConfiguration | configuration | ) |
|
Initializes a new instance of the EnergyHubContext class with the specified configuration.
- Parameters
-
configuration | The configuration instance. |
The documentation for this class was generated from the following file: