title: Seed One to many relationship in EF Core 2.0
body: <p>Folks, I have the following table structure</p>
  
  <pre><code>public class PolicySubStatus
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int PolicySubStatusId { get; set; }
      public string SubStatusName { get; set; }
      public IList&lt;PolicySubStatusReason&gt; PolicySubStatusReason { get; set; }        
  
  }
  public class PolicySubStatusReason
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int PolicySubStatusReasonId { get; set; }
      public string SubStatusReason { get; set; }
  }
  </code></pre>
  
  <p>This create the igration and update the DB correctly with the appropriate FK for one to many relationships.</p>
  
  <p>My issue is seeding the data using ModelBuilder, how do I create the join in the data ?
  I have this</p>
  
  <pre><code>modelBuilder.Entity&lt;PolicySubStatusReason&gt;().HasData(
              new PolicySubStatusReason
              {
                  PolicySubStatusReasonId = 1,                      
                  SubStatusReason = "Claim Repair Documents"
  
              },
           new PolicySubStatusReason
              {
                  PolicySubStatusReasonId = 2,
                  SubStatusReason = "Cause of Loss Statement"
  
              },
  </code></pre>
  
  <p>How do I go about seeding the PolicySubStatus to reference the above list of PolicySubStatusReason ?</p>