How to seed a many-to-many relationship in EF Core 11
Seed the join table of a many-to-many relationship in EF Core 11: the implicit shadow keys you must name yourself, the UsingEntity HasData pattern, and the runtime UseSeeding alternative that works with skip navigations.