title: EF Core and Many to Many HttpPUT not working
body: <p>I'm trying to use HtppPUT on many to many relationships between contacts and skills. My objects are like this:</p>
  <p>Contacts:</p>
  <pre><code> public class ContactDB
  {
      [Key]
      public int ContactId { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string FullName { get; set; }
      public string Address { get; set; }
      public string Email { get; set; }
      public string PhoneNumber { get; set; }
  
      public List&lt;ContactSkill&gt; ContactSkills { get; set; }
  }
  </code></pre>
  <p>Skills :</p>
  <pre><code>public class SkillDB
  {
      public int SkillId { get; set; }
      public string SkillName { get; set; }
      public int Level { get; set; }
  
      public List&lt;ContactSkill&gt; ContactSkills { get; set; }
  }
  </code></pre>
  <p>ContactSkills :</p>
  <pre><code> public class ContactSkill
  {
      public int ContactId { get; set; }
      public virtual ContactDB Contact { get; set; }
      public int SkillId { get; set; }
      public virtual SkillDB Skill { get; set; }
  }
  </code></pre>
  <p>The context :</p>
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;ContactDB&gt;()
          .HasKey(c =&gt; c.ContactId);
  
          modelBuilder.Entity&lt;SkillDB&gt;()
              .HasKey(s =&gt; s.SkillId);
  
          // Define link between Contacts and Skills
          modelBuilder.Entity&lt;ContactSkill&gt;()
              .HasKey(cs =&gt; new { cs.ContactId, cs.SkillId });
          modelBuilder.Entity&lt;ContactSkill&gt;()
              .HasOne(cs =&gt; cs.Contact)
              .WithMany(c =&gt; c.ContactSkills)
              .HasForeignKey(cs =&gt; cs.ContactId);
          modelBuilder.Entity&lt;ContactSkill&gt;()
              .HasOne(cs =&gt; cs.Skill)
              .WithMany(s =&gt; s.ContactSkills)
              .HasForeignKey(cs =&gt; cs.SkillId);
      }
  </code></pre>
  <p>The Get, Delete, Post requests works.</p>
  <p>But when I try to update a contact, I get to update it but not the associated Skills.
  In the Controller, if I take a look of the Contact, it doesn't have Skills associate</p>
  <p><a href="https://i.stack.imgur.com/zXer3.png" rel="nofollow noreferrer">Context Contact</a></p>
  <p>Maybe that's why the update doesn't work, but I don't know why.</p>