You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
542 B
C#
17 lines
542 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace EntityFrameworkCore.Jet.IntegrationTests.Model09
|
|
{
|
|
public class ThreeMap : IEntityTypeConfiguration<Three>
|
|
{
|
|
|
|
public void Configure(EntityTypeBuilder<Three> 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();
|
|
}
|
|
}
|
|
} |