title: DbSet Add method does not support inheritance?
body: <p>I have the following POCO classes:</p>
  
  <pre><code>Public Class CompetitionSubscription
      Public Property ID As Long
      Public Overridable Property CompetitionID As Long
      Public Overridable Property CompetitionPlayerID As Long
      Public Property CompetitionStrength As Short?
      Public Property StrengthWithinSection As Short?
  End Class
  
  &lt;NotMapped()&gt;
  Public Class FullCompetitionSubscription
      Inherits CompetitionSubscription
  
      Public Property Competition As Competition
      Public Property CompetitionPlayer As CompetitionPlayer
  
  End Class
  </code></pre>
  
  <p>And a DbContext of just one table like this:</p>
  
  <pre><code>Public Class CompetitionSubscriptionsDB
      Inherits DbContext
  
      Public Property CompetitionSubscriptions As DbSet(Of CompetitionSubscription)
  
  End Class
  </code></pre>
  
  <p>I have written a unit test like this:</p>
  
  <pre><code>&lt;TestMethod()&gt;
  Public Sub AddSubscriptionToDatabase()
  
       Using db = New CompetitionSubscriptionsDB
           Dim subscription = New FullCompetitionSubscription With
                            {.CompetitionID = 1,
                             .CompetitionPlayerID = 1,
                             .CompetitionStrength = 2,
                             .StrengthWithinSection = 12}
           db.CompetitionSubscriptions.Add(DirectCast(subscription, CompetitionSubscription))
           db.SaveChanges()
       End Using
  
   End Sub
  </code></pre>
  
  <p>This fails with the folllowing error (translated from Dutch so probably not the exact message): 
  <em>No Metadata found for EntityType CompetitionSubscriptionsLib.FullCompetitionSubscription</em>.</p>
  
  <p>As the <code>FullCompetitionSubscription</code> class is adorned with the <code>&lt;NotMapped&gt;</code> attribute I can understand the error message, but the point of the <code>DirectCast</code> was to "sell" the <code>FullCompetitionSubscription</code> as a base <code>CompetitionSubscription</code> to the <code>DbContext</code> (If I change the type of <code>subscription</code> to <code>CompetitionSubscription</code> the test passes).</p>
  
  <p>Where do I go wrong?</p>