EF Core - Creating two navigation properties mapped to a single inverse property
up vote
0
down vote
favorite
I have the following entities set up. public class Car { public int Id { get; protected set; } public HashSet<Wheel> FrontWheels { get; set; }; public HashSet<Wheel> RearWheels { get; set; }; } public class Wheel { public int Id { get; protected set; } //public Car Car { get; set; } public double Diameter { get; set; } public double Width { get; set; } } A Car has Wheels. It interacts with the fronts and rears very differently and therefore they are held in different collections. A wheel by itself is neither a front or a rear (it could be either), it is only through its association with the car that it is given a position on the car. I can set this up in EF Core 2.1 using the following config: modelBuilder.Entity<Car>().HasMany(car