netmash/infrastructure/Netmash.Infrastructure.Data.../DbContexts/MigrationDbContext.cs

25 lines
880 B
C#

using Microsoft.EntityFrameworkCore;
using Netmash.Infrastructure.DatabaseMigration.Entities;
using Netmash.Infrastructure.DatabaseMigration.Entities.Configurations;
namespace Netmash.Infrastructure.DatabaseMigration.DbContexts
{
internal class MigrationDbContext : DbContext
{
public MigrationDbContext(DbContextOptions<MigrationDbContext> options) : base(options)
{
}
public DbSet<MigrationSignature> MigrationSignatures { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfiguration(new MigratedScriptConfiguration());
modelBuilder.ApplyConfiguration(new MigratedVersionConfiguration());
modelBuilder.ApplyConfiguration(new MigrationSignatureConfiguration());
}
}
}