Invalid Column Name using Entity Framework
<p>I'm using Entity Framework to generate my model and whilst the generation of the model itself is successful I'm getting the following error when querying the database.</p>

<blockquote>
  <p>Invalid column name 'EmployeeDealer_EmployeeDealerID'</p>
</blockquote>

<p>The code that throws the exception is:</p>

<pre><code>var employee = db.Employees.Where(emp =&gt; emp.EmployeeID == employeeId).FirstOrDefault();
</code></pre>

<p>It all looks fairly straightfoward so I'm assuming EF hasn't been able to generate the proper keys or ORM classes?</p>

<p>Here's the DB Schema for the related tables. </p>

<p><a href="https://i.stack.imgur.com/tp9yr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tp9yr.png" alt="DB Schema"></a> </p>

<p>Any assistance on how to resolve this would be greatly appreciated.</p>