using BlueLaminate.EFCore.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace BlueLaminate.EFCore.Configurations; public class TradeItemConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder entity) { entity.HasOne(e => e.Trade) .WithMany(t => t.TradeItems) .HasForeignKey(e => e.TradeId); entity.HasOne(e => e.InventoryItem) .WithMany(i => i.TradeItems) .HasForeignKey(e => e.InventoryItemId); } }