From 8c003a5c60ab8298ce4a50e14814997d5c921002 Mon Sep 17 00:00:00 2001 From: "Luke Parker [SSW]" <10430890+Hona@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:26:37 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20EF=20configs=20not=20apply?= =?UTF-8?q?ing=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #11 --- src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs b/src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs index fbf6ec8..5791da3 100644 --- a/src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs +++ b/src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs @@ -3,4 +3,9 @@ public partial class AppDbContext : DbContext { public AppDbContext(DbContextOptions options) : base(options) { } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly); + } } \ No newline at end of file