Fixed visual separation issues

This commit is contained in:
2024-11-21 17:02:15 +01:00
parent 01cd0e1590
commit e8c61dbc7f
4 changed files with 11 additions and 9 deletions

View File

@@ -1,9 +1,10 @@
# Database initialization
You also need to initialize the data source with the tables from HopFrame
You also need to initialize the data source with the tables from HopFrame.
## Create a DbContext
1. Create a c# class that inherits from the `HopDbContextBase` and add a data source (In the example Sqlite is used)
1. Create a c# class that inherits from the `HopDbContextBase` and add a data source (In the example Sqlite is used)\
**IMPORTANT:** You need to leave the `base.OnConfiguring(optionsBuilder)` in place so the HopFrame model relations are set correctly.
```csharp
public class DatabaseContext : HopDbContextBase {
@@ -14,9 +15,6 @@ You also need to initialize the data source with the tables from HopFrame
}
}
```
**IMPORTANT:** You need to leave the `base.OnConfiguring(optionsBuilder)` in place so the HopFrame model relations are set correctly.
<p>&nbsp;</p>
2. Register the `DatabaseContext` as a service