title: How to model look-up tables with EF DbContext
body: <p>I am using Entity Framwork DbContexts with a legacy database.  I have 2 different properties of an entity that both need to reference the same lookup table, like so:</p>
  
  <pre>
  <code>
  public class Address
  {
     public virtual AddressType AnAddressType {get; set;}
     public virtual AddressType AnotherAddressType {get; set;}
  }
  
  // now here's a LINQ query that just flat won't work:
  from a in Addresses select a;
  
  </code>
  </pre>
  
  <p>The exception indicates that we tried to include a completely fictional field in the select list -- the field doesn't appear in my POCO or the table -- it looks like it was expected by convention, it's named AnAddressType_AddressType or something close to that</p>
  
  <p>The AddressType entity does not have a corresponding navigation property on it.  I cannot seem to get this to work.  When I attempt to select data with my LINQ query, I get runtime errors.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I have other relations that are working (this code is generated from the "stock" DbContext generator).  The thing about this one relation that is different is that the lookup table does not have a navigation property back to the main table (the lookup table is used all over the place, so I don't really want to add nav properties from it to everything that uses it).  EF seems to be having a problem with that.  It's probably a configuration vs. convention thing, and I have inadvertently tripped on some kind of convention problem.</p>