From 53a0439edb6b4653ee3f143fdce5473beb47bed3 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Thu, 30 May 2024 20:10:13 +0300 Subject: [PATCH] feat: add wrap DbContext for OnModelCreating --- SqlData/Persistence/Common/BaseDbContext.cs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 SqlData/Persistence/Common/BaseDbContext.cs diff --git a/SqlData/Persistence/Common/BaseDbContext.cs b/SqlData/Persistence/Common/BaseDbContext.cs new file mode 100644 index 0000000..c3dd911 --- /dev/null +++ b/SqlData/Persistence/Common/BaseDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; + +namespace Mirea.Api.DataAccess.Persistence.Common; + +public abstract class BaseDbContext(DbContextOptions options) : DbContext(options) where TContext : DbContext +{ + public void ApplyConfigurations(ModelBuilder modelBuilder) => + base.OnModelCreating(modelBuilder); +} \ No newline at end of file