Duplicate ForeignKey when using inheritance
问题 I have created these classes in order to generate the database model via EntityFramework 6 code-first approach: public class Vehicle { public long Id { get; set; } public long ResponsiblePersonId { get; set; } } public class Car: Vehicle { public int HorsePower { get; set; } } public class Bike: Vehicle { public int FrameSize { get; set; } } public class Organisation { public Organisation() { Cars = new List<Car>(); Bikes = new List<Bikes>(); } public long Id { get; set; } public List<Car>