Учитывая эти 2 простых насмешливых класса, я получаю:
System.Data.Edm.EdmAssociationEnd: : Multiplicity is not valid in Role
'Customer2_Radio2_Target' in relationship 'Customer2_Radio2'.
Because the Dependent Role properties are not the key properties, the
upper bound of the multiplicity of the Dependent Role must be
public class Customer2
{
[Key]
public int Customer2Id { get; set;}
public Radio2 Radio2 { get; set; }
[ForeignKey("Radio2")]
public int Radio2Id { get; set; }
}
public class Radio2
{
[Key]
public int Radio2Id { get; set; }
public Customer2 Customer2 { get; set; }
[ForeignKey("Customer2")]
public int? Customer2Id { get; set; }
}
Хорошо, я понимаю, что это говорит мне, но на самом деле не знаю, что с этим делать. Было бы очень удобно иметь свойство nav2 Customer2 на Radio2. Мне кажется, что EF не нравится эта идея так сильно, как мне: -)
Опция