title: Entity Framework Core cannot create Seed with Child objects and GUID's
body: <p>Let's say I have the following entities:</p>
  
  <pre><code> public class Artist
   {
       [Key]
       public Guid Id { get; set; }
  
       [Required]
       public string Name { get; set; }
   }
  
  public class Song
  {
      [Key] 
      public Guid Id { get; set; }
  
      [Required] 
      public string Name { get; set; }
  
      [Required]  
      public Artist Artist { get; set; }
  }
  </code></pre>
  
  <p>For the <code>Song</code> class I'm trying to create a seed like for example:</p>
  
  <pre><code>modelBuilder.Entity&lt;Song&gt;().HasData(new Song
      {
          Id = Guid.NewGuid(),
          Name = "test",
          Artist = new Artist
          {
              Id = Guid.NewGuid(),
              Name = "test"
          }
      });
  </code></pre>
  
  <p>This is throwing the following error: </p>
  
  <blockquote>
    <p>The seed entity for entity type 'Song' cannot be added because there was no value provided for the required property 'ArtistId'.</p>
  </blockquote>
  
  <p>I have no clue why I keep getting this error. When I try to seed the <code>Artist</code> object only, I have no issues. I also tried referencing an existing <code>Artist</code> object, however the result where the same.</p>
  
  <p>Edit: I forgot to mention that the code can indeed run, however when trying to create a migration through the <code>Add-Migration InitialCreate</code> command, the error shows.</p>