using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Netmash.Infrastructure.DatabaseMigration.Entities.Configurations { internal class MigratedVersionConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("MigratedVersion", "migration").HasKey(z => z.Id); builder.Property(z => z.Id).ValueGeneratedOnAdd(); builder.HasMany(z => z.Scripts).WithOne().HasForeignKey(z => z.VersionId); } } }