title: Using Nbuilder leads to foreign key constraint failure
body: <p>I am trying to write a unit test with Xunit for my ASP.NET Core 3.1 application.</p>
  <p>I use NBuilder (version 6.1) for creating some test data as follows:</p>
  <pre><code>var listOne = Builder&lt;DependantClassA&gt;.CreateListOfSize(1)
      .All()
          .With(x =&gt; x.IntPropertyA = 60)
          .With(x =&gt; x.MyClass = classList[0])
      .Build().ToList();
  
  dbcontext.DependantClassA.Add(listOne[0]);
  dbcontext.SaveChanges();
  </code></pre>
  <p>When I execute this code I get an error</p>
  <blockquote>
  <p>SqliteException: SQLite Error 19: 'FOREIGN KEY constraint failed'</p>
  </blockquote>
  <p>However, when I change to this:</p>
  <pre><code>var listTwo = new List&lt;DependantClassA&gt;
  {
      new DependantClassA
      {
          IntPropertyA = 60,
          MyClass = classList[0],
      }
  };
  
  dbcontext.DependantClassA.Add(listTwo[0]);
  dbcontext.SaveChanges();
  </code></pre>
  <p>The model is just added to my database without any problem. So my guess is it must have to do something with the Nbuilder, but I have no idea what I am doing wrong or what I could change.</p>
  <p>Note: <code>classList</code> is also created with NBuilder, I do not have problems adding those objects to my <code>dbContext</code> though.</p>
  <p>Note 2: When I compare the properties of both objects, I cannot see any difference.</p>