title: Entity Framework Data Annotation with type inheritance
body: <p>I have a class CashPoint and a class Entity I wish to inherit the primary key for, such that:</p>
  
  <pre><code>public class Entity
  {
  
      [Key]
      public int EntityID { get; set; }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public class CashPoint : Entity
  { 
  //        [Key]
  //        public int EntityID { get; set; }
  
      [ForeignKey("EntityID")]
      public Entity Entity { get; set; }
  }
  </code></pre>
  
  <p>To be clear, EntityID is both the primary key and the foreign key of the Cashpoint class, whereby other types similar to Cashpoint should inherit from Entity (and have a similar PK/FK structure)</p>
  
  <p>Currently in my db, Entity also has it's own table with it's own PK (of course).</p>
  
  <p>I also do not wish to use fluent mappings (if possible).</p>
  
  <p>Sorry if it's a repeat question but I couldn't find a use-case either in MSDN docs or SO!</p>
  
  <p>EDIT:  the issue is a reported EF error:</p>
  
  <p>Invalid column name 'CashPoint_EntityID'.
  Invalid column name 'ServiceType_ServiceTypeID'.</p>
  
  <p>When I create a new Context and set the Service type via DbSet</p>