public class Attribute { [Key] public int AttributeId { get; set; } [Required, StringLength(100)] public string Name { get; set; } public int ValueAttributeId { get; set; } public Attribute ValueAttribute { get; set; } public IList<Attribute> ValueAttributes { get; set; } } modelBuilder.Entity<Attribute>() .HasOptional(a => a.ValueAttribute) .WithMany(a => a.ValueAttributes) .HasForeignKey(a => a.ValueAttributeId);
\ tSystem.Data.Entity.Edm.EdmAssociationType :: Multiplicity conflicts with a relational constraint in the Attribute_ValueAttribute_Target role with respect to Attribute_ValueAttribute. Since all properties of the dependent role are not NULL, the multiplicity of the leading role must be "1".
Aaaaahhhh .....
source share