netmash/infrastructure/NDB.Infrastructure.Database.../DbContexts/MigrationDbContext.cs

25 lines
868 B
C#
Raw Normal View History

2022-01-21 11:19:51 +02:00
using Microsoft.EntityFrameworkCore;
using NDB.Infrastructure.DatabaseMigration.Entities;
using NDB.Infrastructure.DatabaseMigration.Entities.Configurations;
2022-01-21 11:19:51 +02:00
namespace NDB.Infrastructure.DatabaseMigration.DbContexts
{
internal class MigrationDbContext : DbContext
{
public MigrationDbContext(DbContextOptions<MigrationDbContext> options) : base(options)
{
}
public DbSet<MigrationSignature> MigrationSignatures { get; set; }
2022-01-21 11:19:51 +02:00
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfiguration(new MigratedScriptConfiguration());
modelBuilder.ApplyConfiguration(new MigratedVersionConfiguration());
modelBuilder.ApplyConfiguration(new MigrationSignatureConfiguration());
2022-01-21 11:19:51 +02:00
}
}
}