diff --git a/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Contexts/LeedsBeerQuestDbContext.cs b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Contexts/LeedsBeerQuestDbContext.cs index 5200338..cbaa27b 100644 --- a/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Contexts/LeedsBeerQuestDbContext.cs +++ b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Contexts/LeedsBeerQuestDbContext.cs @@ -1,4 +1,5 @@ using LeedsBeerQuest.API.Data.Models; +using LeedsBeerQuest.API.Data.Seed; using Microsoft.EntityFrameworkCore; namespace LeedsBeerQuest.API.Data.Contexts; @@ -17,4 +18,10 @@ public class LeedsBeerQuestDbContext : DbContext protected override void OnConfiguring(DbContextOptionsBuilder options) => options.UseSqlite("Data Source=lbq.db"); + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + var seeder = new LeedsBeerQuestSeeder(modelBuilder, ""); + seeder.Seed(); + } } \ No newline at end of file diff --git a/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Seed/LeedsBeerQuestSeeder.cs b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Seed/LeedsBeerQuestSeeder.cs new file mode 100644 index 0000000..7ad51e1 --- /dev/null +++ b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Data/Seed/LeedsBeerQuestSeeder.cs @@ -0,0 +1,19 @@ +using Microsoft.EntityFrameworkCore; + +namespace LeedsBeerQuest.API.Data.Seed; + +public class LeedsBeerQuestSeeder +{ + private readonly ModelBuilder _modelBuilder; + private readonly string _dataSourcePath; + + public LeedsBeerQuestSeeder(ModelBuilder modelBuilder, string dataSourcePath) + { + _modelBuilder = modelBuilder; + _dataSourcePath = dataSourcePath; + } + + public void Seed() + { + } +} \ No newline at end of file