title: EF CORE multiple properties that map to the same table
body: <p>I have this data model that I cant make it work.<br>
  One <code>User</code> can be associated to a <code>Company</code> <strong>AND</strong> multiple at the same time.<br>
  However a <code>Company</code> has multiple <code>Users</code><br>
  Image example below:
  <a href="https://i.stack.imgur.com/19CrG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/19CrG.png" alt="enter image description here"></a>
  I have tried to set relations on the modelBuilder like this:</p>
  
  <pre><code> builder
          .HasMany(c =&gt; c.Users)
          .WithOne(u =&gt; u.CurrentAssociatedCompany)            
          .HasForeignKey(u =&gt; u.CurrentAssociatedCompanyId)
          .IsRequired();
  </code></pre>
  
  <p>But i get an error in the migration </p>
  
  <blockquote>
    <p>Value cannot be null. (Parameter 'key')</p>
  </blockquote>
  
  <p>Even researched about InverseProperty but no luck there either.<br>
  <strong>My question, is it possible to achieve this or should I try a different approach?</strong></p>