title: The entity type 'List<PersonAddress>' was not found. Ensure that the entity type has been added to the model
body: <p>I'm building an application with .net core 2.0.  I have a Person object with a list of addresses. Addresses are stored in the Addresses table.  I then have a joining table that relates Person to Addresses.</p>
  
  <pre><code>class Person {
      public List&lt;PersonAddress&gt; Addresses { get; set; } 
  }
  
  class Address {
      ...address properties...
  }
  
  class PersonAddress{
      public int AddressId { get; set; }
      public Address Address { get; set; }
  
      public int PersonId { get; set; }
      public Person Person { get; set; }
  }
  </code></pre>
  
  <p>When I save a Person object with a PersonAddress that contains an address, it works great. It inserts a new person, a new address, and a new record in the joining table. (I have configured relationships in the fluent api).</p>
  
  <p>When I try to update, however, I have a problem.  After loading a person object with a list of their addresses, I can add, remove, or change the addresses, and the changes are not tracked.</p>
  
  <p>I tried this in my controller to get it to process changes:</p>
  
  <pre><code>dbContext.Entry(person.Addresses).State = EntityState.Modified;
  </code></pre>
  
  <p>And I get this error:</p>
  
  <p><code>The entity type 'List&lt;PersonAddress&gt;' was not found. Ensure that the entity type has been added to the model.</code></p>
  
  <p>It is unquestionably on the model, so I don't know why this isn't working.  I trid this:</p>
  
  <pre><code>person.Addresses.ForEach(item =&gt; _context.Entry(item).State = EntityState.Modified);
  </code></pre>
  
  <p>And it was ok with it, but this doesn't track adding or removing, so it's not sufficient.</p>