title: Entity Framework - model FK association without entity reference?
body: <p>We are using Entity Framework 5 Code First in an n-tier setup (Silverlight/WCF).</p>
  
  <p>In order to simplify our entity graphs for this scenario, we don't use navigation properties for associations that are not dependent on the PK of the root entity, just mapped FK properties, eg:</p>
  
  <pre><code>Deal
   - PaymentScheduleID (FK property)
   - PaymentSchedule (dependent on Deal so we need to use navigation property)
   - BusinessUnitID (FK property, Deal is optionally dependent on BusinessUnit)
  </code></pre>
  
  <p>In this example PaymentSchedule is a reference to an entity that is defined only in terms of the parent deal, so we use a navigation property and a FK property with an association mapping using the Fluent API.</p>
  
  <p>If we add a deal with a new payment schedule, EF will work out based on our association mapping that it needs to insert PaymentSchedule before it inserts Deal, which is what we want.</p>
  
  <p>However, if I need to add a new BusinessUnit as well, EF may put the inserts in the wrong sequence because it doesn't know that BusinessUnitID is a FK to BusinessUnit, and I get errors from the database.</p>
  
  <p>Is there any way to tell EF that a FK association exists in the database without needing a navigation property on the model? I can't see any way of doing it using the Fluent API.</p>