feat: add wrap DbContext for OnModelCreating
This commit is contained in:
parent
78a242f4c3
commit
53a0439edb
9
SqlData/Persistence/Common/BaseDbContext.cs
Normal file
9
SqlData/Persistence/Common/BaseDbContext.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.Common;
|
||||
|
||||
public abstract class BaseDbContext<TContext>(DbContextOptions<TContext> options) : DbContext(options) where TContext : DbContext
|
||||
{
|
||||
public void ApplyConfigurations(ModelBuilder modelBuilder) =>
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
Loading…
Reference in New Issue
Block a user