title: EntityFramwork Core and Inheritance TPT
body: <p>I have read some posts, like <a href="https://stackoverflow.com/questions/26036436/entityframework-tpt-inheritance">this</a>, <a href="https://stackoverflow.com/questions/63624654/entity-framework-core-tpt">this</a> and <a href="https://docs.microsoft.com/en-gb/ef/core/modeling/inheritance" rel="nofollow noreferrer">this</a>.</p>
  <p>Some tables from the database:</p>
  <p><a href="https://i.stack.imgur.com/IW9z8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IW9z8.png" alt="enter image description here" /></a></p>
  <p>I migrated from EF4 creating the models using <a href="https://stackoverflow.com/questions/63463226/migrate-entity-framework-4-0-to-core">Scaffold-DbContext</a>, I expected it generates followings:</p>
  <pre><code>class Tagesinkassos {}
  class TagesinkassosPOSTagesinkasso : Tagesinkassos {}
  class TagesinkassosTagesinkasso : Tagesinkassos {}
  </code></pre>
  <p>instead I got:</p>
  <pre><code>class TagesinkassosPOSTagesinkasso {}
  class TagesinkassosTagesinkasso {}
  class Tagesinkassos {
      public virtual TagesinkassosPOSTagesinkasso TagesinkassosPOSTagesinkasso { get; set; }
      public virtual TagesinkassosTagesinkasso TagesinkassosTagesinkasso { get; set; }
  }
  </code></pre>
  <p>I read that TPC is not supported in EFCore yet, but this is TPT, right?</p>
  <p>However, if I modify the generated models, I get:</p>
  <pre><code>System.InvalidOperationException: 'The entity type 'TagesinkassosTagesinkasso' cannot be mapped to a table because it is derived from 'Tagesinkassos'. Only base entity types can be mapped to a table.'
  </code></pre>
  <p>Is it possible to modify the models or is there something in the DB that forces this pattern?</p>