title: Circular dependency error during creating migration
body: <p>I have two entities that are related by a foreign key with a one-to-many relationship. when I try to perform a migration, I get an error related to the circular dependency. i tried to create an OnDelete.Cascade rule in DbContext but the error is still the same.</p>
  <pre><code>            modelBuilder.Entity&lt;Image&gt;()
              .HasOne&lt;Part&gt;(i =&gt;i.Part)
              .WithMany(a =&gt;a.Images)
              .HasForeignKey(i=&gt;i.PartId)
              .OnDelete(DeleteBehavior.Cascade);
  </code></pre>
  <blockquote>
  <p><strong>System.InvalidOperationException:</strong> Unable to save changes because a circular dependency was detected in
  the data to be saved: 'Project.Models.Part [Deleted] Image { 'ImageId'
  } &lt;- Project.Models.Image [Deleted] Images { 'PartId' } &lt;-
  Project.Models.Part [Deleted]</p>
  </blockquote>
  <pre><code>public class Part
  {
      [Column(&quot;PartId&quot;)]
      public Guid Id { get; set; }
  
      public ICollection&lt;Image&gt; Images { get; set; }
  
  }
  
  public class Image
  {
      [Column(&quot;ImageId&quot;)]
      public Guid Id { get; set; }
  
      public bool isPoster { get; set; }
  
      public string Name { get; set; }
  
      public string Path { get; set; }
  
      [ForeignKey(nameof(Part))]
      public Guid PartId { get; set; }
      public Part Part { get; set; }
  }
  </code></pre>