title: EF6: Using collection property without creating FK field in child table
body: <p>I'm studying EF6 and think I know quite a bit already, but couldn't find a good solution (yet) for this:</p>
  
  <p>Suppose I have the following model classes:</p>
  
  <pre><code>class LivingRoom {
      public int Id { get; set; }
      public string Name { get; set; }
  
      public PersonTypeId { get; set; }
      public IList&lt;Person&gt; Persons { get; set; } 
  }
  
  class Person {
      public int Id { get; set; }
      public int PersonTypeId { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>With these model classes I'm able to save and load via DbContext without any problem. Thanks to the navigation property in the "parent" LivingRoom class, the Persons collection will be included in this process. I don't have to load/save them separately.</p>
  
  <p>UPDATE: Forgot the logical PersonTypeId field which will be used for determining which Persons should be in the collection property.</p>
  
  <p>So far so good.</p>
  
  <p>But EF6 is creating a FK in the Persons table, pointing to the LivingRooms table, which seems logical.</p>
  
  <p>But what if I'm going to use the Persons table for a lot more other parent entities, like eg. "Bus" and "Plane", and therefore don't want to have a dependency (= FK field in LivingRooms table) in the Persons table?</p>
  
  <p>Can I achieve this (don't create the FK field) without breaking the "include child list" load/save process as described?</p>
  
  <p>If yes, how? And if no, why not?</p>
  
  <p>NB: Please understand that I want to learn the best techniques. So good advice, to not doing this, is also welcome.</p>