title: EF Core 5 - Set custom property value in custom join table
body: <p>Based on examples, I created the following custom join table (using EF Core 5), since I needed an extra property in my custom join table:</p>
  <pre><code>modelBuilder.Entity&lt;Property&gt;(property =&gt;
  {
      property
          .HasMany(_ =&gt; _.Addresses)
          .WithMany(_ =&gt; _.Properties)
          .UsingEntity&lt;PropertyAddress&gt;(
              _ =&gt; _.HasOne(_ =&gt; _.Address).WithMany().HasForeignKey(_ =&gt; _.AddressId),
              _ =&gt; _.HasOne(_ =&gt; _.Property).WithMany().HasForeignKey(_ =&gt; _.PropertyId));
  });
  
  public class PropertyAddress
  {
      public string PropertyId { get; set; }
      public string AddressId { get; set; }
      public int SequenceNumber { get; set; }
      public Property Property { get; set; }
      public Address Address { get; set; }
  }
  
  public class Property
  {
      public ICollection&lt;Address&gt; Addresses { get; set; }
  }
  
  public class Address
  {
      public ICollection&lt;Property&gt; Properties { get; set; }
  }
  </code></pre>
  <p>The custom join table <code>PropertyAddress</code> is working as expected, however: How can I (programmatically) set the values for the custom property <code>PropertyAddress.SequenceNumber</code> before saving/updating records? (Because the whole joining mechanism is (now) still being handled 'behind the scene' by EF Core.)</p>