Skip to content

Commit

Permalink
🐛 Fix EF configs not applying (#12)
Browse files Browse the repository at this point in the history
Fixes #11
  • Loading branch information
Hona authored Jan 14, 2024
1 parent 0683e56 commit 8c003a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/VerticalSliceArchitectureTemplate/Common/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
public partial class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
}
}

0 comments on commit 8c003a5

Please sign in to comment.