using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace EntityFrameworkCore.Jet.IntegrationTests.Model09 { public class ThreeMap : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasKey(t => new { t.Id, t.OneId, t.TwoId }); builder.ToTable("Three"); builder.HasOne(t => t.Two).WithMany(t => t.ThreeList).HasForeignKey(t => new {t.OneId, t.TwoId}).IsRequired(); } } }