One to Many with a join table and an optional relationship in Entity Framework 4.1 Fluent API
问题 Again with a legacy database that cannot be changed and using Entity Framework 4.1 with the Fluent API to read data only. public class Client { [Key] public int ClientID { get; set; } public string Name { get; set ;} public virtual ICollection<Phone> Phones { get; set; } } public class Phone { [Key] public int PhoneID { get; set; } public string Number { get; set; } public virtual Client Client { get; set; } } public class ClientPhone { [Key] [Column(Order=0)] public int ClientID { get; set;