title: Entity Framework Core: Loop reference on getting rows
body: <p>I have these 2 tables:</p>
  <pre><code>public class Book
  {
      public Guid Id { get; set; }
      public Library Library { get; set; }
  }
  
  public class Library
  {
      public Guid Id { get; set; }
      public ICollection&lt;Book&gt; Books { get; set; }
  }
  </code></pre>
  <p>Well, when I run this code:</p>
  <pre><code>_context.Books.Include(b =&gt; b.Library).ToList();
  </code></pre>
  <p>I want to get only the books with their library and the entity <strong>Library</strong> with the Books property as null. But I get this property with every books of the libraries, then when I want to update one book always throw the Exception:</p>
  <blockquote>
  <p>The instance of entity type 'Book' cannot be tracked because another
  instance with the same key value for {'Id'} is already being tracked.</p>
  </blockquote>
  <p>Is there any way to get all the books with the Library property <strong>Books</strong> as null value?</p>