ef6 code first identity key in parent table as foreign key in child table
<p>I am giving the description of my entity below .It will be more easy to understand</p>

<p><strong>Parent Entity</strong></p>

<pre><code>    [Key]
    [Column(Order = 0)]
    [Required]
    public virtual string Invno { get; set; }

     [Key]
    [Column(Order =1)]
    [Required]
    public virtual string Customer { get; set; }


    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public virtual int Sslno { get; set; }


    public virtual ICollection&lt;ChildEntity&gt; ChildEntity { get; set; }
</code></pre>

<p><strong>Child Entity</strong></p>

<pre><code>    [Key]
    [Column(Order = 0)]
    [Required]
    public virtual string Itemcode { get; set; }


    [Key]
    [Column(Order = 1)]
    [Required]
    public virtual double Price { get; set; }


    [Key]
    [Column(Order = 2)]
    [Required]
    public virtual int Sslno { get; set; }


    [ForeignKey("Sslno")]
    public virtual ParentEntity ParentEntity { get; set; }
</code></pre>

<p>Giving me the error: </p>

<blockquote>
  <p>The number of properties in the Dependent and Principal Roles in a relationship constraint must be identical</p>
</blockquote>

<p>Note: I dont want to make Invno and customer as foreign key</p>