# Database initialization 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) ```csharp public class DatabaseContext : HopDbContextBase { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.UseSqlite("..."); } } ``` **IMPORTANT:** You need to leave the `base.OnConfiguring(optionsBuilder)` in place so the HopFrame model relations are set correctly.
2. Register the `DatabaseContext` as a service ```csharp builder.Services.AddDbContext