Fixed visual separation issues
This commit is contained in:
@@ -8,7 +8,6 @@ This Installation adds all HopFrame [pages](../pages) and [services](../services
|
||||
```
|
||||
|
||||
2. Create a [DbContext](./Database.md) that inherits the ``HopDbContext`` and add a data source
|
||||
<p> </p>
|
||||
|
||||
3. Add the HopFrame services to your application, provide the previously created `DatabaseContext` that inherits from `HopDbContextBase`
|
||||
|
||||
|
||||
@@ -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> </p>
|
||||
|
||||
2. Register the `DatabaseContext` as a service
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ This Installation adds all HopFrame [endpoints](../endpoints) and [services](../
|
||||
```
|
||||
|
||||
2. Create a [DbContext](./Database.md) that inherits the ``HopDbContext`` and add a data source
|
||||
<p> </p>
|
||||
|
||||
3. Add the HopFrame services to your application, provide the previously created `DatabaseContext` that inherits from `HopDbContextBase`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user